Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Aug 30, 2011 11:29 pm 
Offline
Newbie

Joined: Tue Aug 30, 2011 11:23 pm
Posts: 3
This is my /etc/network/interfaces (sans IPs):

Code:
auto lo
iface lo inet loopback

auto eth0

iface eth0 inet static
 address ...
 netmask ...
 gateway ...
 pre-up iptables-restore < /etc/iptables.saved


Didn't want to paste my iptables.saved, but suffice it to say that if I run iptables-restore < /etc/iptables.saved manually at any point after reboot, it restores the correct rules.

Asked Linode for help, they referred me to forums :/


Top
   
 Post subject:
PostPosted: Wed Aug 31, 2011 12:14 am 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
What if you replace "pre-up" with up/post-up? Perhaps your rules have some interface-specific parameters that won't work if your interface is still down?

-- David


Top
   
 Post subject:
PostPosted: Wed Aug 31, 2011 12:36 am 
Offline
Newbie

Joined: Tue Aug 30, 2011 11:23 pm
Posts: 3
db3l wrote:
What if you replace "pre-up" with up/post-up? Perhaps your rules have some interface-specific parameters that won't work if your interface is still down?

-- David


Ooh, I like where you're going w/ this, will try it (can't reboot production box, though). Is there a set of rules I should look for off the top of your head ?

And is there a difference between up and (EDIT) post-up ?


Top
   
 Post subject:
PostPosted: Wed Aug 31, 2011 1:02 am 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
romy wrote:
Ooh, I like where you're going w/ this, will try it (can't reboot production box, though). Is there a set of rules I should look for off the top of your head ?

Look for "-i <interface>" in the rules, for example.

Quote:
And is there a difference between up and (EDIT) post-up ?

I think they're synonymous.

In terms of testing, you could always spin up a test Linode just long enough to test. Copy over your iptables save file from the production box and do a few tests on it. You could also try installing the rules while on the console with eth0 still down.

-- David


Top
   
 Post subject:
PostPosted: Thu Sep 01, 2011 10:14 am 
Offline
Newbie

Joined: Tue Aug 30, 2011 11:23 pm
Posts: 3
Yup, definitely had a bunch of -i rules in the file. I'll give it a test soon.

Thanks!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group