on my linux machine I see the following:

 iptables -L
 Chain INPUT (policy ACCEPT)
 target     prot opt source               destination

 Chain FORWARD (policy ACCEPT)
 target     prot opt source               destination

 Chain OUTPUT (policy ACCEPT)
 target     prot opt source               destination

but from /etc/sysconfig/iptables I see many rules

so my question is

if from iptables -L I see all are ACCEPT dose this mean the /etc/sysconfig/iptables rules are not relevant ?

  • They're abviously now applied, and such you may say that they are not relevant in understanding what actually happens on the machine, but they might be relevant in what you want to happen. – Henrik Jul 11 '16 at 13:06
  • classic typo there? "now" should be "not" ... Sometimes that one character can make so much difference :) – starfry May 10 at 11:01

The rules in /etc/sysconfig/iptables are loaded when the iptables service is started.

Since your firewall chains appear empty, there's probably nothing in there. Do not that there could rules set like the nat and raw tables.

If you change the rules directly in /etc/sysconfig/iptables, you need to restart the iptables service and inversely if you add rules dynamically with iptables, you may wish to save them with iptables-save.

  • so if I understanding the rules in the /etc/sysconfig/iptables can affect the the traffic(block network etc ) and they are affected since iptable service is up - am I correct – yael Jul 11 '16 at 13:11
  • if I want to ignore all the rules ( to accept all ) - the simple way is to do - /etc/sysconfig/iptables stop ? – yael Jul 11 '16 at 13:13
  • The exact command depends on your OS but may well be service iptables stop or systemctl stop iptables. – Julie Pelletier Jul 11 '16 at 13:14

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.