[Gllug] Problems with postrouting and iptables
andy at mac1systems.com
andy at mac1systems.com
Fri Aug 22 16:03:24 UTC 2003
Hi,
I'm having problems getting my system to only translate the source when
going to eth1, my public interface. It seems to be doing it on the private
side as well.
I have 213.232.87.0/29 on the public side and 192.168.24.0/22 on the
private.
ipv4 forwarding is enabled.
Each 192.168.x.0 is its own class C with the linux box having ip aliases on
the eth0 port.
Connections from 192.168.27.x to a public get correctly SNATed and it works
a treat (and from the others).
But also connections from 192.168.27.x to 192.168.25.x are also being
SNATed and look like they are coming from the gateway, which I don't want.
I have the following in my script to add rules.
iptables -A FORWARD -s $LOCAL_NET -d $LOCAL_NET -j ACCEPT
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to 213.232.87.50
I've looked at the output from iptables -L and it doesn't show the nat list
at all and a specific iptables -L nat gives an error that the tables not
known?
Any ideas as to why its doing it on the eth0 too would be greatly
appreciated. I've googled and googled and pulled various hairs out, but I
think perhaps I'm not seeing the wood for the trees?
Cheers
Andy
p.s. I'm sending this from my unregistered address from an IP in Africa, I
hope it still gets through.
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list