firewall-cmd rules conversion

Support for security such as Firewalls and securing linux
Post Reply
discuduru
Posts: 4
Joined: 2015/12/08 17:18:16

firewall-cmd rules conversion

Post by discuduru » 2015/12/08 17:31:11

Hi; sorry for my bad english (spanish and french help are welcome!)
On my school we have and old Centos 5.8 with a system to prevent not allowed to the wireless, wich is dhcp server. This system was created by the old manager, never more working here. It creates a list of fixed ip associated to an mac-adress; if no match, no connection! Great job! This system creates a lot of iptables rules like this one, using an script:

$IPTABLES -A INPUT -m mac --mac-source c4:17:fe:b3:ae:75 -s 192.168.2.247 -i $ETH_WIFI -j ACCEPT

Question1: how to recreate this rules with firewall-cmd?
And if possible, is there another system to make te same control?

Thanks a lot.
PS: I am not an expert, as you can suppose. Thank you.

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: firewall-cmd rules conversion

Post by TrevorH » 2015/12/08 17:43:16

You don't have to use firewalld on CentOS 7, you can disable it and install the iptables service and use that instead.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

discuduru
Posts: 4
Joined: 2015/12/08 17:18:16

Re: firewall-cmd rules conversion

Post by discuduru » 2015/12/08 17:49:04

Thanks for the reply. I have read about this solution, but I'm very confused because in many places are saying that this is not convenient..I have read that use iptables instead is simply...
I don't know what to do!

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: firewall-cmd rules conversion

Post by TrevorH » 2015/12/08 17:51:03

Yes but if your current solution is based around using iptables directly then firewalld is going to need a huge conversion effort so just removing it and using the old style iptables service will fix that issue.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

discuduru
Posts: 4
Joined: 2015/12/08 17:18:16

Re: firewall-cmd rules conversion

Post by discuduru » 2015/12/08 17:58:08

So, it will be any problem in the future with new releases? Iptables will be allways there in Centos?

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: firewall-cmd rules conversion

Post by TrevorH » 2015/12/08 18:07:07

I can't make promises about what will in future releases because only Redhat knows. However, since firewalld is only a front-end to iptables in the first place and manipulates and controls the running rules, I suspect it would be difficult to remove iptables without also breaking firewalld!
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

discuduru
Posts: 4
Joined: 2015/12/08 17:18:16

Re: firewall-cmd rules conversion

Post by discuduru » 2015/12/08 18:21:00

OK, thanks for your help, will remove firewalld and try.
Ciao

Post Reply