LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   CentOS 7 firewall questions iptables vs firewalld and corresponding messages (https://www.linuxquestions.org/questions/centos-111/centos-7-firewall-questions-iptables-vs-firewalld-and-corresponding-messages-4175671912/)

Mckay101 03-24-2020 06:51 PM

CentOS 7 firewall questions iptables vs firewalld and corresponding messages
 
Hello and thank you for taking the time to read my questions. I've used Linux off and on over the years but never to any really serious level but I can usually muddle my way though. That said I do have some questions regarding iptables and firewalld

1) First off opinions on which to use? My understanding is that iptables would have to be separately setup for ipv6 where as firewalld handles both at the same time. Is this right?

2) I am setting up a Cent0S 7 vps and had decided based on my understandings posted in question 1 to switch to firewalld and ran into some prompts I wasn't sure I understood. To be sure I didn't blow up my server while trying to change firewalls over I disabled the eth0 interface and access currently is via the console.

- When I run 'systemctl stop iptables' (yes rules are flushed first) I get a message "unit iptables.service not loaded" Does this mean I never had a firewall up in the first place?

- When I try to disable iptables permanently with 'systemctl disable iptables' it tells me 'no such file or directory'

Not sure if I need to worry about any of the iptables stuff mentioned above or not. This is still a very basic setup so I proceeded to enable firewalld by first enabling it and then starting it. It seems to have worked but game me a message I didn't understand: 'bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.'

I don't know if I do or don't need to pay attention to this but since ip6tables was mentioned I wanted to be sure that I'm not setting up my firewall with a gaping hole in it for ipv6.

I know some / all of this is probably pretty basic to most of you and very much appreciate your input. Thank you,

frankbell 03-24-2020 07:44 PM

I'm not qualified to have an opinion, but there's a detailed comparison of the two at this link: https://www.unixmen.com/iptables-vs-firewalld/

ferrari 03-24-2020 08:46 PM

Quote:

- When I run 'systemctl stop iptables' (yes rules are flushed first) I get a message "unit iptables.service not loaded" Does this mean I never had a firewall up in the first place?

- When I try to disable iptables permanently with 'systemctl disable iptables' it tells me 'no such file or directory'
Yes, this reads like you haven't installed 'iptables-services' yet...
https://linuxize.com/post/how-to-ins...s-on-centos-7/

scasey 03-24-2020 09:15 PM

I just bit the bullet and “learned” firewalld. (Quotes because I’m having to look up everything, every time.)

It’s my understanding (and I could certainly be wrong) that firewalld is but a front end to firewall functions and iptables is just a different front end to that same functionality.

Mckay101 03-24-2020 10:23 PM

Thank you everyone! I've decided to continue with my firewald setup and learn things that way. I appreciate all the input.

Mckay101 03-24-2020 10:25 PM

Quote:

Originally Posted by Mckay101 (Post 6104002)
... I proceeded to enable firewalld by first enabling it and then starting it. It seems to have worked but gave me a message I didn't understand: 'bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.'

I don't know if I do or don't need to pay attention to this but since ip6tables was mentioned I wanted to be sure that I'm not setting up my firewall with a gaping hole in it for ipv6.

The only remaining thing I'm not sure of is this comment that came up when I enabled firewalld the first time. Any idea if it can be ignored or what exactly it means?

berndbausch 03-24-2020 10:32 PM

Quote:

Originally Posted by Mckay101 (Post 6104066)
The only remaining thing I'm not sure of is this comment that came up when I enabled firewalld the first time. Any idea if it can be ignored or what exactly it means?

Looks like a bug that won't be fixed because it's not worth it: https://bugzilla.redhat.com/show_bug.cgi?id=1457120.

Mckay101 03-24-2020 11:02 PM

Thank you for all your help.


All times are GMT -5. The time now is 12:33 AM.