Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have few iptables rules which I want to use permanently. So I've installed iptables-persistent and save my rules in /etc/iptables/rules.v4 and /etc/iptables/rules.v6.

Also I turn on autostart for iptables-persistent service

$ sudo update-rc.d iptables-persistent defaults
$ sudo update-rc.d iptables-persistent enable 2345

But after system starts iptables rules are still empty

$ sudo 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

And when I start iptables-persistent manually, it goes well

$ sudo service iptables-persistent start
 * Loading iptables rules...
 * IPv4...
 * IPv6...

$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source                destination         
DROP       all  --  domain.ru             anywhere            
DROP       all  --  srv246-131.domain.ru  anywhere
etc ...

What am I missing?

share|improve this question
add comment

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.