LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-21-2012, 09:54 AM   #1
KatrinAlec
Member
 
Registered: Feb 2012
Posts: 67

Rep: Reputation: 8
ip-pre-up.d


I've written a script to set up a firewall before the interfaces come up.

The script is saved as
/etc/network/if-pre-up.d/00-firewall

I've added a line with logger, just to see when it is executed
and now that line is repeated 4 times.

I guess it might be because I've got 4 ip interfaces.

how can I prevent that?
 
Old 02-22-2012, 03:15 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Pretending that you are using a debian system check the man page of interfaces and see if the mapping rule can help you to only run your firewall script ones. Or edit your script in /etc/network/if-pre-up.d and insert a check for the devices and only run the script if the device fits.
 
1 members found this post helpful.
Old 02-22-2012, 03:41 AM   #3
KatrinAlec
Member
 
Registered: Feb 2012
Posts: 67

Original Poster
Rep: Reputation: 8
Smile

man interfaces did help, thanks

sometimes I just don't try all the man pages because I don't believe there would be an entry for stuff.
I tried man network and man if-pre-up without any luck.

I think I'll be able to do something with the variables mentioned in interfaces.
 
Old 02-22-2012, 06:25 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Sometime one does not see the woods for the trees. If you hitting any dead spots or having more question just post and I'll see what I can do.
 
Old 02-22-2012, 06:38 AM   #5
KatrinAlec
Member
 
Registered: Feb 2012
Posts: 67

Original Poster
Rep: Reputation: 8
Thumbs up

Thanks for that offer. I might take you up on it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pre Linux Ollied LinuxQuestions.org Member Intro 0 04-20-2010 09:20 AM
Pre-emptive vs. Non-pre-emptive kernel jhwilliams Linux - General 7 09-05-2007 10:06 PM
pre-installed lonk Slackware 5 02-17-2007 06:41 AM
ld and pre-linking Frustin Programming 2 12-13-2005 11:51 AM
Pre-Wireless SnowSurfAir Linux - Wireless Networking 2 06-27-2003 10:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration