I configure NAT and use "services ..." to save it but when I reboot there is no nat
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
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.
I configure NAT and use "services ..." to save it but when I reboot there is no nat
Hi all,
I am running RH9. I have my firewall configured and working fine. I issue a nat command to enable nat, then use the service ... command to save it, and can see it in the iptables file. But when I reboot I don't get nat. If I manually reissue the command all works great. Do I need to provide more info or is there someting simple here I'm missing?
# Generated by iptables-save v1.2.7a on Sat Aug 21 14:07:17 2004
*nat
:PREROUTING ACCEPT [8:894]
:POSTROUTING ACCEPT [45:2951]
:OUTPUT ACCEPT [45:3132]
[3:361] -A POSTROUTING -o eth1 -j SNAT --to-source 166.70.87.58
COMMIT
# Completed on Sat Aug 21 14:07:17 2004
# Generated by iptables-save v1.2.7a on Sat Aug 21 14:07:17 2004
*mangle
:PREROUTING ACCEPT [1871:128641]
:INPUT ACCEPT [1864:127783]
:FORWARD ACCEPT [5:300]
:OUTPUT ACCEPT [1723:128158]
:POSTROUTING ACCEPT [1732:129416]
COMMIT
# Completed on Sat Aug 21 14:07:17 2004
# Generated by iptables-save v1.2.7a on Sat Aug 21 14:07:17 2004
*filter
:INPUT ACCEPT [3:252]
:FORWARD ACCEPT [2:120]
:OUTPUT ACCEPT [1723:128158]
:RH-Lokkit-0-50-INPUT - [0:0]
[1864:127783] -A INPUT -j RH-Lokkit-0-50-INPUT
[5:300] -A FORWARD -j RH-Lokkit-0-50-INPUT
[0:0] -A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 22 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
[1482:101205] -A RH-Lokkit-0-50-INPUT -i lo -j ACCEPT
[369:24867] -A RH-Lokkit-0-50-INPUT -i eth0 -j ACCEPT
[4:796] -A RH-Lokkit-0-50-INPUT -s 198.60.22.2 -p udp -m udp --sport 53 -j ACCEPT
[0:0] -A RH-Lokkit-0-50-INPUT -s 198.60.22.22 -p udp -m udp --sport 53 -j ACCEPT
[0:0] -A RH-Lokkit-0-50-INPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j REJECT --reject-with icmp-port-unreachable
[9:843] -A RH-Lokkit-0-50-INPUT -p udp -m udp -j REJECT --reject-with icmp-port-unreachable
COMMIT
# Completed on Sat Aug 21 14:07:17 2004
After this runs I don't have nat. So I issue the command:
/sbin/iptables -t nat -A POSTROUTING -o $EXTIF -j SNAT --to-source $EXTADDR
Then everything works great.
If I execute the command "service save iptables" or "iptables-save > /etc/sysconfig/iptables" the above file is the result. But when I reboot I once again do not have nat.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.