ip masquerade

naxis naxis at valiansys.com
Thu Jan 20 15:30:07 UTC 2005


these are some details about my network.
I'm trying to to share the internet with a linux machine.
I can communicate with skypie but cannot surf the net and connot chat
messengers.
Network

eth0 get dynamic ip address from the router(192.168.11.4) 
eth1 FC3 local dhcp server (IP:192.168.1.1 GW:eth0)

"ifconfig"gives
eth0      Link encap:Ethernet  HWaddr 00:01:80:31:44:B9
          inet addr:192.168.11.4  Bcast:192.168.11.255  Mask:255.255.255.0
          inet6 addr: fe80::201:80ff:fe31:44b9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:45822 errors:0 dropped:0 overruns:0 frame:0
          TX packets:39918 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5477428 (5.2 MiB)  TX bytes:4769221 (4.5 MiB)
          Interrupt:11 Base address:0xe400

eth1      Link encap:Ethernet  HWaddr 00:90:99:33:4C:DF
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::290:99ff:fe33:4cdf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:45972 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38004 errors:0 dropped:0 overruns:0 carrier:0
          collisions:18 txqueuelen:1000
          RX bytes:5369348 (5.1 MiB)  TX bytes:5827700 (5.5 MiB)
          Interrupt:10 Base address:0xdc00

I run
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.1.0/24 -j MASQUERADE

I edited  /etc/sysctl.conf setting
net.ipv4.ip_forward = 1
and run  "sysctl -p"(advices I saw on this mailing list)

"iptables -L -n -t nat" shows this for the POSTROUTING:

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 192.168.1.0/24 0.0.0.0/0

"route -n" gives
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.11.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth1
0.0.0.0         192.168.11.1    0.0.0.0         UG    0      0        0 eth0


I can communicate with skypie so I think the internet sharing is OK but
I cannot surf the net and cannot communicate with messengers

Alexander,Remi and Christopher I need your help.




More information about the fedora-list mailing list