[CentOS] firewalld trouble opening a port

Mon May 11 13:18:34 UTC 2015
Bowie Bailey <Bowie_Bailey at BUC.com>

On 5/9/2015 3:24 PM, Tim Dunphy wrote:
> Hi Earl,
>
>> The problem is you added the rule in runtime and when you reloaded it
>> removed the rule that you added; therefore you need to use --permanent >or
>> do not reload.
> Thanks! That worked.
>
> [root at appd:~] #firewall-cmd --zone=home --list-ports
> [root at appd:~] #firewall-cmd --zone=home --add-port=8181/tcp --permanent
> success
> [root at appd:~] #firewall-cmd --reload
> success
> [root at appd:~] #firewall-cmd --zone=home --list-ports
> 8181/tcp

Just remember that the permanent command doesn't add the rule 
immediately, so it doesn't take effect *until* you reload.

you can also do this:

# firewall-cmd --zone=home --add-port=8181/tcp
# <add other stuff>
<Test that everything works right>
# firewall-cmd --runtime-to-permanent

That way, if you screw something up, you can simply reload (or reboot) 
to fix it.

-- 
Bowie