Tag Archives: service iptables status

How to Disable the Firewall on Linux

How to Disable the Firewall on Linux

Contents
___________________________________________________________________________________________________________

1. Verify iptables status
2. Stop the iptables service
3. Re-verify iptables status
4. Stop the iptables service from starting when you restart the server
___________________________________________________________________________________________________________


1. Verify firewall

[root@rac2 ~]# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination
1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
2    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0
3    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
4    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
5    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination
1    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

[root@rac2 ~]#


2. Stop the iptables service

[root@rac2 ~]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
[root@rac2 ~]#


3. Re-verify iptables status

[root@rac2 ~]# service iptables status
iptables: Firewall is not running.
[root@rac2 ~]#


4. Stop the iptables service from starting when you restart the server

[root@rac2 ~]# chkconfig iptables off
[root@rac2 ~]#

Caution: Your use of any information or materials on this website is entirely at your own risk. It is provided for educational purposes only. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.

Thank you,
Rajasekhar Amudala
Email: br8dba@gmail.com