LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 08-18-2012, 03:47 AM   #1
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013

Rep: Reputation: 30
does iptables restart remove manual settings?


I run this manually on my server:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

However, when I change the iptables script and restart iptables, it seems to remove the above routing. Is that normal?
Do I have to add that routing into my current script?
 
Old 08-18-2012, 06:14 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by qwertyjjj View Post
Is that normal?
If this is "normal" depends on your 'grep -i ^i.*save_on /etc/sysconfig/iptables-config' settings.


Quote:
Originally Posted by qwertyjjj View Post
Do I have to add that routing into my current script?
If you want it, yes. If the above settings from /etc/sysconfig/iptables-config are set to NO then
Code:
# save iptables rule set to temporary file:
umask 0027; /sbin/iptables-save > /tmp/.iptables.$$
# verify the only changes are your rule (unless you have enabled say counters saving in iptables-config): 
diff --side-by-side /tmp/.iptables.$$ /etc/sysconfig/iptables | less
# and if OK backup and copy contents over:
cp /etc/sysconfig/iptables /etc/sysconfig/iptables.previous
cat /tmp/.iptables.$$ > /etc/sysconfig/iptables && rm -f /tmp/.iptables.$$
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Red Hat Login failed! Have to manual restart. HELP karmakid Red Hat 1 12-21-2005 09:13 PM
manual network reconfiguration at restart zby Debian 6 07-02-2004 04:37 AM
Manual DIsplay Settings: A Noob Triumphs Over Stupidity Ovalteen LinuxQuestions.org Member Success Stories 0 06-10-2004 01:07 AM
Samba freezes upon manual restart ironChimp Linux - Networking 0 03-02-2003 03:49 PM
manual rpm remove adenardo Linux - Software 9 12-04-2002 03:45 PM

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

All times are GMT -5. The time now is 05:14 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
Open Source Consulting | Domain Registration