LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-30-2004, 08:46 PM   #1
iheardrain
LQ Newbie
 
Registered: Sep 2004
Posts: 3

Rep: Reputation: 0
Smile Priority: script to run on boot vs. "service iptables save"


Suppose you have the rc.firewall script setup to run on boot and you also have saved a set of rules using the ‘service iptables save’ command. Also, you have used ntsysv to enable iptables to initialize for runlevels 3, 4, and 5. If you now boot, which rule set will be in effect – the rc.firewall rule set or the /etc/sysconfig/iptables rule set?

Thanks guys...
 
Old 09-30-2004, 08:53 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,063

Rep: Reputation: 761Reputation: 761Reputation: 761Reputation: 761Reputation: 761Reputation: 761Reputation: 761
I would say that which ever script runs last would be in effect.
 
Old 09-30-2004, 08:56 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
I don't have the service thing-a-majick so I
wouldn't be able to test :) ... but why don't you
just do a "iptables-save > ~/test" and compare
that file to your saved rule-set? ;}


Cheers,
Tink
 
Old 09-30-2004, 09:22 PM   #4
iheardrain
LQ Newbie
 
Registered: Sep 2004
Posts: 3

Original Poster
Rep: Reputation: 0
Well most of the time in linux the first has the say in whats going on. When you write a script the first rules always win priority...
 
Old 09-30-2004, 09:30 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
Not if the second script flushes all rules ;)
... which is what most firewall scripts would
do, just to make sure.


Cheers,
Tink
 
Old 09-30-2004, 10:53 PM   #6
iheardrain
LQ Newbie
 
Registered: Sep 2004
Posts: 3

Original Poster
Rep: Reputation: 0
To flush I would have to run a flush command... Right? It's what I'm studying right now in my linux firewall class...
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script: using "select" to show multi-word options? (like "option 1"/"o zidane_tribal Programming 6 03-21-2013 11:35 AM
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 08:42 AM
Simple "service" script for dealing with rc files arobinson74 Slackware 0 09-07-2004 12:43 AM
When running a script I get a box asking "Run or display ?" I want it to just run aaronruss Linux - Newbie 4 05-28-2004 01:03 AM
How to run "time" service?? indiaprince1978 Linux - Newbie 1 11-17-2003 01:11 AM


All times are GMT -5. The time now is 03:09 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration