Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The following entries are used to flush the iptable rules:

/sbin/iptables --policy INPUT ACCEPT

/sbin/iptables --policy OUTPUT ACCEPT

/sbin/iptables --policy FORWARD ACCEPT

/sbin/iptables -F

Is it possible to place the above in any file(/etc/iptables.rules) so that I can use

iptables-apply -t 60 /etc/iptables.rules

to avoid misconfiguration?.

share|improve this question
up vote 0 down vote accepted

your /etc/iptables.rules file should look like this :


share|improve this answer
Then how about "iptables -F"? – user53864 Oct 7 '10 at 4:35
iptables-apply flushes the rules prior to applying them anyway.... – Geraint Jones Oct 7 '10 at 4:46
Ok!. Is it possible to log iptables other than logging in syslog? – user53864 Oct 7 '10 at 5:36

Your Answer


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.