Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.