LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 03-24-2020, 06:51 PM   #1
Mckay101
LQ Newbie
 
Registered: Mar 2020
Posts: 4

Rep: Reputation: Disabled
Question 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,
 
Old 03-24-2020, 07:44 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,328
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
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/
 
Old 03-24-2020, 08:46 PM   #3
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,813

Rep: Reputation: 1143Reputation: 1143Reputation: 1143Reputation: 1143Reputation: 1143Reputation: 1143Reputation: 1143Reputation: 1143Reputation: 1143
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/
 
Old 03-24-2020, 09:15 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
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.
 
Old 03-24-2020, 10:23 PM   #5
Mckay101
LQ Newbie
 
Registered: Mar 2020
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thank you everyone! I've decided to continue with my firewald setup and learn things that way. I appreciate all the input.
 
Old 03-24-2020, 10:25 PM   #6
Mckay101
LQ Newbie
 
Registered: Mar 2020
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Mckay101 View Post
... 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?
 
Old 03-24-2020, 10:32 PM   #7
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Mckay101 View Post
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.
 
Old 03-24-2020, 11:02 PM   #8
Mckay101
LQ Newbie
 
Registered: Mar 2020
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thank you for all your help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to Set Up a Firewall with FirewallD on CentOS 7 LXer Syndicated Linux News 0 07-23-2018 08:12 PM
LXer: Set Up and Configure a Firewall with FirewallD on CentOS 7 LXer Syndicated Linux News 0 02-15-2017 11:31 AM
[SOLVED] CentOS 7 - Problems with firewalld/iptables on CentOS 7 Router -Can't connect to MariaDB between private networks (Virtual Box) arkfantasy CentOS 4 01-09-2017 01:56 PM
How to search for a corresponding tag in xml file and replace the corresponding value userofunix Linux - Newbie 1 09-17-2012 02:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 06:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration