How To Disable FIREWALLD In rhel-7 And Enable IPTABLES

[root@server ~]# cat /etc/system-release
Red Hat Enterprise Linux Server release 7.1 (Maipo)

[root@server ~]# systemctl  status firewalld
firewalld.service – firewalld – dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
Active: active (running) since Mon 2016-03-28 10:06:01 PDT; 52min ago
Main PID: 873 (firewalld)
CGroup: /system.slice/firewalld.service
└─873 /usr/bin/python -Es /usr/sbin/firewalld –nofork –nopid

Mar 28 10:06:01 server.puppet.in systemd[1]: Started firewalld – dynamic firewall daemon.

[root@server ~]# systemctl  disable firewalld
rm ‘/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service’
rm ‘/etc/systemd/system/basic.target.wants/firewalld.service’

[root@server ~]# systemctl  stop firewalld

[root@server ~]# systemctl  status firewalld
firewalld.service – firewalld – dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled)
Active: inactive (dead)

Mar 28 01:27:34 server.puppet.in systemd[1]: Starting firewalld – dynamic firewall daemon…
Mar 28 10:06:01 server.puppet.in systemd[1]: Started firewalld – dynamic firewall daemon.
Mar 28 10:59:35 server.puppet.in systemd[1]: Stopping firewalld – dynamic firewall daemon…
Mar 28 10:59:35 server.puppet.in systemd[1]: Stopped firewalld – dynamic firewall daemon.

[root@server ~]# yum install iptables
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Package iptables-1.4.21-13.el7.x86_64 already installed and latest version
Nothing to do

[root@server ~]# systemctl enable iptables
ln -s ‘/usr/lib/systemd/system/iptables.service’ ‘/etc/systemd/system/basic.target.wants/iptables.service’

[root@server ~]# systemctl enable ip6tables
ln -s ‘/usr/lib/systemd/system/ip6tables.service’ ‘/etc/systemd/system/basic.target.wants/ip6tables.service’

[root@server ~]# systemctl start iptables

[root@server ~]# systemctl start ip6tables

[root@server ~]# systemctl status iptables.service
iptables.service – IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; enabled)
Active: active (exited) since Mon 2016-03-28 11:02:50 PDT; 30s ago
Process: 3741 ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=0/SUCCESS)
Main PID: 3741 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/iptables.service

Mar 28 11:02:50 server.puppet.in systemd[1]: Starting IPv4 firewall with iptables…
Mar 28 11:02:50 server.puppet.in iptables.init[3741]: iptables: Applying firewall rules: [  OK  ]
Mar 28 11:02:50 server.puppet.in systemd[1]: Started IPv4 firewall with iptables.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s