Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried following the instructions in this link to disable and remove iptables firewall using commands:

# service iptables save
# service iptables stop
# chkconfig iptables off
# iptables -F
# iptables -X
# iptables -t nat -F
# iptables -t nat -X
# iptables -t mangle -F
# iptables -t mangle -X
# iptables -P INPUT ACCEPT
# iptables -P OUTPUT ACCEPT

Its seems to work temporarily and then the firewall gets enabled again by itself even without restarting.

Any ideas what I'm doing wrong?

share|improve this question
add comment

1 Answer 1

There might be other background processes that automatically regenerate the iptables ruleset.

You must understand that iptables is just a userland program to manipulate the netfilter tables in the kernel. It can't be 'turned off', except by recompiling the kernel. The command service iptables stop actually just issues a 'flush' directive against the in-kernel tables.

If any other process invokes the iptables program (or manipulate the in-kernel netfilter tables directly via libnetfilter) then the ruleset will be repopulated.

So, if you want to prevent the netfilter ruleset from being regenerated, you must audit your running processes. fail2ban, for instance, automagically generates netfilter rules.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.