Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a Ubuntu 10.10 server. I have an iptable rule that needs to get added before networking is started. How can I do that?

I've tried this: http://askubuntu.com/questions/66890/how-can-i-make-a-specific-set-of-iptables-rules-permanent

...which says to put an entry in the /etc/rc.local file that enters the rule. However, I've noticed that the server is on the network a couple seconds before my rule gets entered. It does that every time. In this instance that couple seconds is unacceptable because a remote computer is constantly pinging this server. If a ping gets through before my rule gets entered then bad things happen. Any ideas?



share|improve this question
Don't you have the iptables-persistent package available? And why are you still using 10.10? –  Michael Hampton Aug 31 '13 at 5:45
Is it just a single rule? You could use a pre-up in your network/interfaces file. –  Zoredache Aug 31 '13 at 19:35
Sweet! It worked to add the pre-up. @Zoredache, if you add this as a answer I will select it as the answer. –  user548971 Sep 1 '13 at 4:05

Your Answer


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

Browse other questions tagged or ask your own question.