Disable Iptables in CentOS 6.4

Disable Iptables in CentOS 6.4

I was setting up a test server using CentOS 6.4 and I couldn't reach my webserver so I did a quick check of the firewall with:

iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     icmp --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Ah! there's the problem iptables was blocking me, as I don't need a firewall I decided to disable it, so to do this we make sure we are root then:

service iptables stop
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Unloading modules:                               [  OK  ]

Then check if we have done it:

iptables -L
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Turn off!

Make sure it doesn't start at boot:

chkconfig iptables off

That's it!

Have fun.


16/04/2014 19:33:00 Shaun Freeman Filed Under: Linux CentOS, iptables, Linux


Twitter Feed
Shaun Freeman @Zendmaster

Shaun Freeman @Zendmaster

Fixing PHP OPcache mysql_xdevapi Uncaught Error: Call to a member function limit() https://t.co/3xSyOxmlj1

Shaun Freeman @Zendmaster

I liked a @YouTube video https://t.co/iI9BZaslSm 8 super heroic Linux commands that you probably aren't using

Shaun Freeman @Zendmaster

I liked a @YouTube video https://t.co/SOOJGb32h0 How to Maximize Your Productivity (As a Software Developer or Learning Programming)

Shaun Freeman @Zendmaster

I liked a @YouTube video https://t.co/8nGfvmdsI2 From Carnivore Diet to Near-Death: Lessons Learned From Today's Most Popular Fad Diet

Shaun Freeman @Zendmaster

I liked a @YouTube video https://t.co/EFLh2y3I24 Carnivore Diet – Myths about Meat – Phil Escott – WHIS 2018