However in RHEL 7 / CentOS 7, iptables will not be there andfound that I can still use the iptables by disabling firewalld service.
So, If you are in same condition as mine and you want to use iptables on CentOS / RHEL 7 instead of firewalld, Please follow this howto.
As we all know that, CentOS / RHEL 7 both are completely systemd based, So We will have to use few systemd related commands to disable firewalld and enable iptables service.
1. Disable Firewalld Service.
[root@rhel-centos7-tejas-barot-linux ~]# systemctl mask firewalld2. Stop Firewalld Service.
[root@rhel-centos7-tejas-barot-linux ~]# systemctl stop firewalld3. Install iptables service related packages.
[root@rhel-centos7-tejas-barot-linux ~]# yum -y install iptables-services4. Make sure service starts at boot:
[root@rhel-centos7-tejas-barot-linux ~]# systemctl enable iptables# If you do not want ip6tables, You can skip following command.
[root@rhel-centos7-tejas-barot-linux ~]# systemctl enable ip6tables5. Now, Finally Let’s start the iptables services.
[root@rhel-centos7-tejas-barot-linux ~]# systemctl start iptables# If you do not want ip6tables, You can skip following command.
[root@rhel-centos7-tejas-barot-linux ~]# systemctl start ip6tablesFirewalld Service is now disabled and stop, You can use iptables.
Now, You will be able to use iptables as your firewall, You can add / remove rules as you were doing in previous releases of Red Hat / CentOS 5 and 6, You can configure firewall with iptables in same manner as previous.
No comments:
Post a Comment