[CentOS] Putting nat routing into place permanently? -- service iptables save

Bryan J. Smith thebs413 at earthlink.net
Tue Nov 1 16:38:12 UTC 2005


Preston Crawford wrote:  
> What's the canonical way to do this in CentOS/RHEL? I
> know how to do it from the command line, but how to do
> I make a NAT route permanent?

Tom Brown <tom.brown at goodtechnology.com> wrote:
> rc.local ?

Actually, for newer kernel 2.4+ Fedora-based distros
(including CentOS 3+), it's recommended you use the "service
iptables save" (or "/etc/init.d/iptables save").

It basically parses the currently configured tables in the
kernel and outputs them (in short-hand form) to the
configuration file /etc/sysconfig/iptables.

Then configure the iptables script to start at boot for
run-levels 2+.  FYI, I'm not sure what happens to any "saved
changes" if you re-configure /etc/sysconfig/iptables from the
"Firewall Setup" though.  So do that with care.


-- 
Bryan J. Smith                | Sent from Yahoo Mail
mailto:b.j.smith at ieee.org     |  (please excuse any
http://thebs413.blogspot.com/ |   missing headers)



More information about the CentOS mailing list