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?.

link|improve this question

62% accept rate
feedback

1 Answer

up vote 0 down vote accepted

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

:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]

COMMIT
link|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.... – c10k Consulting 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
feedback

Your Answer

 
or
required, but never shown

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