Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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.