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 01-18-2002, 09:23 AM   #1
ForumKid
Member
 
Registered: Dec 2001
Posts: 195

Rep: Reputation: 30
My iptables script is /etc/sysconfig/iptables. How do i make this baby execute on boo


I want to make it execute on boot. Is there a certain way that i should be doing it? I need to make sure that it executes everytime the server is restarted?

Im not sure if i should just put the script inside rc.local.
Thanks
 
Old 01-18-2002, 09:41 AM   #2
JimKyle
Member
 
Registered: Dec 2001
Location: Oklahoma City, OK, USA
Distribution: Xubuntu 12.04 LTS
Posts: 156

Rep: Reputation: 18
Check to make certain that iptables really is a script, not a data file created by iptables-save. In my Mandrake 8.1 system, it's a data file, and I added to rc.local the line "/sbin/iptables-restore" in order to re-create the rules at boot. I also created a daily cron job for root, to do "/sbin/iptables-save" each night, so that any rules added by portsentry during the day would be saved...

Check out your actual initialization scripts to see for certain that the "start" and "stop" actions for iptables use the /etc/sysconfig/iptables data or script... I suspect, though, that most recent distributions will be rather similar to what I have here.
 
Old 01-18-2002, 09:41 AM   #3
bluecadet
Member
 
Registered: Oct 2001
Distribution: MD81 RH71
Posts: 555

Rep: Reputation: 30
yeah, just link it there. that's normal.
 
Old 01-22-2002, 07:36 AM   #4
phil1076
Member
 
Registered: Oct 2001
Location: Grand Cayman
Distribution: RH 9.0
Posts: 96

Rep: Reputation: 16
go into your script directory and make the script executable. (chmod 755 scriptname)

go into /etc/rc.d/rc3.d and create a symlink to the script. Call the link Sxxfirewall, where xx is a number that corresponds to which order you want it to execute it. eg: S90dhcp will run before S92firewall.
 
  


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
iptables in sysconfig?? Mibble Red Hat 6 10-16-2005 09:37 PM
numbers in /etc/sysconfig/iptables sti2envy Linux - Security 1 10-06-2005 08:24 AM
iptables -P vs :OUTPUT in /etc/sysconfig/iptables TomF Linux - Security 2 04-14-2005 10:50 PM
IPTABLES - rules in /etc/sysconfig/iptables The_JinJ Linux - Newbie 6 11-20-2004 01:40 AM
Execute a script from iptables padukes Linux - Networking 6 03-17-2002 06:15 PM


All times are GMT -5. The time now is 12:21 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