Re: firewalld trouble opening a port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



>
> 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.



That's a very excellent point! I'll have to remember that. I've read a few
guides on how to use firewall-cmd on CentOS 7, but I haven't seem this tip
mentioned anywhere!

So thanks for pointing that out!

On Mon, May 11, 2015 at 9:18 AM, Bowie Bailey <Bowie_Bailey@xxxxxxx> wrote:

> 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@appd:~] #firewall-cmd --zone=home --list-ports
>> [root@appd:~] #firewall-cmd --zone=home --add-port=8181/tcp --permanent
>> success
>> [root@appd:~] #firewall-cmd --reload
>> success
>> [root@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
>
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos
>



-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux