LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 08-31-2004, 06:51 PM   #1
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware, CentOS, Ubuntu
Posts: 325

Rep: Reputation: 30
if i run iptables-save ... is it permanent even if machine is rebooted?


if i run iptables-save ... is it permanent? will the current iptables be saved forever even if system is rebooted?
thanks!
 
Old 08-31-2004, 07:09 PM   #2
AeonDevil
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Rep: Reputation: 0
iptables-save just outputs your tables into a file.

If you want your tables to be permanent you have to put it in a script on startup or something similar.

here's one way:
1. create a file in "/etc/rc.d/" most ppl would use "rc.firewall".
2. edit "/etc/rc.d/rc.firewall" and enter your commands on startup.
3. edit "/etc/rc.d/rc.local" and at the very bottom add "/etc/rc.d/rc.firewall"
4. change the permission for "/etc/rc.d/rc.firewall" something like:
chmod u+c /etc/rc.d/rc.firewall.

and it should automatically run on startup.

hope this helps
 
Old 08-31-2004, 10:08 PM   #3
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware, CentOS, Ubuntu
Posts: 325

Original Poster
Rep: Reputation: 30
thank you very much!
im using slackware 10...
do i really need to include /etc/rc.d/rc.firewall to my /etc/rc,d/rc.local to execute it on startup?

i thought every file in /etc/rc.d/ is executed on startup as long as they are executable by root.... now i know that i was wrong. hehehe thanks!
 
Old 08-31-2004, 10:09 PM   #4
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware, CentOS, Ubuntu
Posts: 325

Original Poster
Rep: Reputation: 30
btw.. what is chmod u+c ?
i just tried that but it says:

chmod: invalid mode string: `u+c'

hmmmmmmmm
 
Old 08-31-2004, 10:25 PM   #5
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Probably was a fat finger slip from u+x .
I'm not sure what everyone else uses but I use chmod 755 /etc/rc.d/rc.firewall.
 
  


Reply



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
HOW my machine got rebooted??? Rinish Linux - Security 9 08-29-2005 07:53 AM
my machine was suddently rebooted Menestrel Linux - Security 5 11-23-2004 03:56 AM
Priority: script to run on boot vs. "service iptables save" iheardrain Linux - General 5 09-30-2004 09:53 PM
uptime has reset itself, but the machine hasnt rebooted SkiTz0.BiLL-BoB Linux - Software 2 03-14-2004 12:33 PM
Clever plan to save machine didn't work Ethan Linux - General 3 06-11-2002 03:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

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
Open Source Consulting | Domain Registration