0

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

0

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

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

COMMIT
  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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