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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-31-2004, 06:51 PM
|
#1
|
Member
Registered: Aug 2002
Location: Philippines
Distribution: Slackware, CentOS, Ubuntu
Posts: 325
Rep:
|
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!
|
|
|
08-31-2004, 07:09 PM
|
#2
|
LQ Newbie
Registered: Aug 2004
Posts: 11
Rep:
|
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
|
|
|
08-31-2004, 10:08 PM
|
#3
|
Member
Registered: Aug 2002
Location: Philippines
Distribution: Slackware, CentOS, Ubuntu
Posts: 325
Original Poster
Rep:
|
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!
|
|
|
08-31-2004, 10:09 PM
|
#4
|
Member
Registered: Aug 2002
Location: Philippines
Distribution: Slackware, CentOS, Ubuntu
Posts: 325
Original Poster
Rep:
|
btw.. what is chmod u+c ?
i just tried that but it says:
chmod: invalid mode string: `u+c'
hmmmmmmmm
|
|
|
08-31-2004, 10:25 PM
|
#5
|
Senior Member
Registered: Oct 2003
Posts: 3,057
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 12:58 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|