Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Centos5 installation with kvm on my server. I am using nat portforwarding to ssh my virtual machines. I have several iptables rules and saved then in /etc/sysconfig/iptables.

After reboot, I see all these rules when I type service iptables status but I am getting a connection refused error. After typing service iptables restart everything works. I don't understand, why do I need to restart iptables again? Doesn't it restart on reboot?

share|improve this question
Check /etc/network/interfaces for pre-up and post-up commands, there could be some other iptables rules. Same thing with /etc/rc.local. – week Nov 12 '12 at 11:55
It depends on network interface somehow. If i restart network when everything works, it doesn't work again. I mean iptables must be started after network, otherwise it doesn't work. How can i find if network script adds some other rules? i can't find anything in eth script. – bilal Nov 12 '12 at 12:31

You must log in to answer this question.

Browse other questions tagged .