LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 08-31-2004, 10:17 AM   #1
bruack
LQ Newbie
 
Registered: Aug 2004
Posts: 3

Rep: Reputation: 0
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?
 
Old 08-31-2004, 11:50 AM   #2
zsoltrenyi
Member
 
Registered: May 2004
Distribution: redhat, trustix, debian
Posts: 103

Rep: Reputation: 15
it's not clear enough for me
what firewall do you use, and whith what command are you saving it?
 
Old 08-31-2004, 06:14 PM   #3
bruack
LQ Newbie
 
Registered: Aug 2004
Posts: 3

Original Poster
Rep: Reputation: 0
# 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.

Thanks, in advance, for your help.
Bruce
 
Old 08-31-2004, 06:15 PM   #4
bruack
LQ Newbie
 
Registered: Aug 2004
Posts: 3

Original Poster
Rep: Reputation: 0
Oh, and I'm just using iptables w/ RH9. I have an outboard ip w/ my isp and and inboard that I have configed as 10.0.1.1
 
Old 09-01-2004, 02:38 AM   #5
zsoltrenyi
Member
 
Registered: May 2004
Distribution: redhat, trustix, debian
Posts: 103

Rep: Reputation: 15
tried iptables-restore?
 
  


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
"shutdown" and "halt" symlinks: poweroff, reboot. sud_crow Linux From Scratch 11 10-17-2006 11:03 PM
Can't install "glibmm" library. "configure" script can't find "sigc++-2.0&q kornerr Linux - General 4 05-10-2005 02:32 PM
Firefox freezes at "Save", "Download" kjmorris Linux - Software 4 10-27-2004 02:44 PM
Tiny Sofa 2.0 - I thought "halt", "reboot" were only root command ?? sorcerer Linux - Distributions 1 08-21-2004 03:28 PM
Removing "shutdown" and "reboot" in logout window nearfar Red Hat 1 10-07-2003 11:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:41 AM.

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