2

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 ?

2
  • 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. Commented Jul 11, 2016 at 13:06
  • classic typo there? "now" should be "not" ... Sometimes that one character can make so much difference :)
    – starfry
    Commented May 10, 2019 at 11:01

1 Answer 1

2

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.

3
  • 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
    Commented Jul 11, 2016 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
    Commented Jul 11, 2016 at 13:13
  • The exact command depends on your OS but may well be service iptables stop or systemctl stop iptables. Commented Jul 11, 2016 at 13:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .