Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP - IP Masquerading LINUX Redhat 7

Status
Not open for further replies.

marshtod

Technical User
Jan 23, 2002
2
US
I am trying to setup IP masquerade. Please see my setup drawing at Setup.pdf
I am a newbie, with a little background. I have followed the how to posted all over the net. I get to the final testing part and cannot ping to the outside world from my Win2000 or Win 98 PC connected to the LINUX. Any suggestions. Can this even be done becasue I am already on my own internal network using the DI704 router/hub. Any answers are GREATLY appreciated.
 
Also, make sure IP forwarding is enabled on the Linux box:

echo "1" > /proc/sys/net/ipv4/ip_forward

Does your client's DNS point to a valid DNS server? Are they using the Linux box as the gateway? Bruce Garlock
bruceg@tiac.net
 
Hi,

Took a bit of time to find that pdf - url is actually .

Anyway, you have multiple nat going on here but I can't see why it shouldn't work if you can get to the internet from the linux box already. All the masquerading will do is send the selected traffic from the two machines at the bottom out of the linux eth0 interface as if it originated from the linux box, i.e. with the IP address of that interface. It doesn't matter which port you use on the hub because its a dumb device that just transmits on all ports other than the origin port.

With iptables you just need :

echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/modprobe iptable_nat
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

On the masquerade clients - set their default gateway as 10.0.0.1 (linux box).

If you're using ipchains its similar - let us know and I'll give you the equivalent to the above.

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top