I have an RH9 server on a cable modem and I'm trying to figure out how to auto-update /etc/sysconfig/iptables whenever my IP changes. Right now, I have to manually edit that file to put the new IP in it. Right now I'm looking at 4 separate lines, across different sections of the file. Is there some way to automatically do that? Is there some way to avoid having the IP hardcoded in the first place?


Under *nat
-A POSTROUTING -o eth0 -j SNAT --to-source <DHCP IP ADDRESS>

Under *filter:
-A INPUT -s <DHCP IP ADDRESS> -i lo -j ACCEPT
-A INPUT -d <DHCP IP ADDRESS> -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -s <DHCP IP ADDRESS> -j ACCEPT


--
H| I haven't lost my mind; it's backed up on tape somewhere.
+--------------------------------------------------------------------
Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130
IT Director / SysAdmin / WebSmith . 800.441.3873 x130
Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6
http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.






--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to