RedHat 7.2 iptables-save problem

RedHat 7.2 iptables-save problem

Post by Nathan Nichol » Mon, 31 Dec 2001 07:07:46



I'm using my RedHat 7.2 box to do NAT via iptables.  I'm having trouble
getting the iptables init script to configure the rules.

I can run the command (iptables -t nat -A POSTROUTING -o eth0 -s
192.168.50.0/255.255.255.240 -j MASQUERADE) manually, and the box will masq
properly.

I saved the ruleset with iptables-save > /etc/sysconfig/iptables.  The file
is written properly, and the iptables init script appears to be setting
everything up correctly.  Even after running the iptables startup script
after a reboot, running iptables-save returns the correct ruleset, but the
machine does not masquerade anything.  I have to run the command manually,
then it will masquerade everything from my internal network properly.

I've also noticed that iptables -L does not return any rule info on the
masquerade rule, regardless of whether or not I run the iptables init script
or the masquerade command manually.

Here's the output of iptables-save:
-----
# Generated by iptables-save v1.2.4 on Sat Dec 29 16:06:24 2001
*nat
:PREROUTING ACCEPT [53:10026]
:POSTROUTING ACCEPT [7:552]
:OUTPUT ACCEPT [7:552]
-A POSTROUTING -s 192.168.50.0/255.255.255.240 -o eth0 -j MASQUERADE
COMMIT
# Completed on Sat Dec 29 16:06:24 2001
# Generated by iptables-save v1.2.4 on Sat Dec 29 16:06:24 2001
*filter
:INPUT ACCEPT [834:54183]
:FORWARD ACCEPT [530:292786]
:OUTPUT ACCEPT [595:76685]
COMMIT
# Completed on Sat Dec 29 16:06:24 2001
-----

I have verified that ipchains is not running on the box (I've even removed
it).  I had this same problem when I ran RH 7.1 on the same machine.  I
completely reinstalled the OS on the machine (using 7.2), and I'm still
running into this problem.

Anyone have any ideas?

 
 
 

RedHat 7.2 iptables-save problem

Post by S C Rigl » Mon, 31 Dec 2001 07:44:02


My masquerading related rules look like this:

*nat
:PREROUTING ACCEPT [39986:2449590]
:POSTROUTING ACCEPT [410:71021]
:OUTPUT ACCEPT [35921:2247507]
-A POSTROUTING -o eth1 -j MASQUERADE
COMMIT
*filter
:INPUT ACCEPT [248896:179591216]
:FORWARD ACCEPT [182710:41251104]
:OUTPUT ACCEPT [553057:188899781]
-A FORWARD -s 192.168.10.0/255.255.255.0 -o eth1 -j ACCEPT
COMMIT

eth0 is an internal interface, eth1 is external.

iptables will list the masquerading rule if you do
iptables -t nat -nL

-S


>I'm using my RedHat 7.2 box to do NAT via iptables.  I'm having trouble
>getting the iptables init script to configure the rules.

>I can run the command (iptables -t nat -A POSTROUTING -o eth0 -s
>192.168.50.0/255.255.255.240 -j MASQUERADE) manually, and the box will masq
>properly.

>I saved the ruleset with iptables-save > /etc/sysconfig/iptables.  The file
>is written properly, and the iptables init script appears to be setting
>everything up correctly.  Even after running the iptables startup script
>after a reboot, running iptables-save returns the correct ruleset, but the
>machine does not masquerade anything.  I have to run the command manually,
>then it will masquerade everything from my internal network properly.

>I've also noticed that iptables -L does not return any rule info on the
>masquerade rule, regardless of whether or not I run the iptables init script
>or the masquerade command manually.

>Here's the output of iptables-save:
>-----
># Generated by iptables-save v1.2.4 on Sat Dec 29 16:06:24 2001
>*nat
>:PREROUTING ACCEPT [53:10026]
>:POSTROUTING ACCEPT [7:552]
>:OUTPUT ACCEPT [7:552]
>-A POSTROUTING -s 192.168.50.0/255.255.255.240 -o eth0 -j MASQUERADE
>COMMIT
># Completed on Sat Dec 29 16:06:24 2001
># Generated by iptables-save v1.2.4 on Sat Dec 29 16:06:24 2001
>*filter
>:INPUT ACCEPT [834:54183]
>:FORWARD ACCEPT [530:292786]
>:OUTPUT ACCEPT [595:76685]
>COMMIT
># Completed on Sat Dec 29 16:06:24 2001
>-----

>I have verified that ipchains is not running on the box (I've even removed
>it).  I had this same problem when I ran RH 7.1 on the same machine.  I
>completely reinstalled the OS on the machine (using 7.2), and I'm still
>running into this problem.

>Anyone have any ideas?


 
 
 

1. problem with ftp client behind redhat 7.2 iptables firewall

I have Redhat 7.2 firewall running Iptables.  It loaded up ip_nat_ftp OK.
But when I log in to my company ftp [IIS 5] (and some others), I can log in
ok .  I can do commands like pwd, help, cd, etc.  But I can't do "ls" and
"dir", it will just freeze.  I have tried on the firewall itself, same
result.  Using IE on Windows client, it will just "searching for folders"
and then replied with "you don't have permission ....".  Using ftp on the RH
firewall, it will just freeze for a minute and not showing file list.  It
seems like only "ls" and "dir" don't work.

2. I can't find ipmasqdadm

3. settings not saved in RedHat 7.2

4. Linux Frequently Asked Questions with Answers (Part 3 of 6)

5. iptables & iptables-save

6. Getting index of a block device ?

7. iptables 1.2.7a "iptables-save" bug?

8. Help!!! Sun Sparc BIOS!!

9. redhat 7.2 iptables logging not working

10. I'm confused with ipchains/iptables on Redhat 7.2

11. Conflict between POP server and iptables firewall on Redhat 7.2

12. iptables ULOG and RedHat 7.2

13. Please Help!!! Redhat 7.2 with IPTABLES 1.2.6a