I found that it is the problem of routing on my test machine on the 192.168.1.0/24 network, fixed.
On Thursday 27 October 2011 18:08:06 you wrote: > I'm now on a router in 3 networks, where eth0 and eth1 are in 2 LANs and > eth2 are in a WAN. Here are the details: > > root@debian:/home/michael# ifconfig > eth0 Link encap:Ethernet HWaddr 00:e0:4c:4d:77:06 > inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 > inet6 addr: fe80::2e0:4cff:fe4d:7706/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:735444 errors:0 dropped:0 overruns:0 frame:0 > TX packets:1216737 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:89416295 (85.2 MiB) TX bytes:1427122256 (1.3 GiB) > Interrupt:20 Base address:0xcc00 > > eth1 Link encap:Ethernet HWaddr 00:50:bf:70:fc:e4 > inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0 > inet6 addr: fe80::250:bfff:fe70:fce4/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:81044 errors:0 dropped:0 overruns:0 frame:0 > TX packets:156456 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:6883331 (6.5 MiB) TX bytes:226037112 (215.5 MiB) > Interrupt:22 Base address:0xe800 > > eth2 Link encap:Ethernet HWaddr 00:1e:90:90:23:7d > inet addr:210.6.148.56 Bcast:210.6.148.127 Mask:255.255.255.128 > inet6 addr: fe80::21e:90ff:fe90:237d/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:3105649 errors:0 dropped:0 overruns:0 frame:0 > TX packets:1551451 errors:0 dropped:0 overruns:0 carrier:3 > collisions:0 txqueuelen:1000 > RX bytes:2449847469 (2.2 GiB) TX bytes:394544116 (376.2 MiB) > > lo Link encap:Local Loopback > inet addr:127.0.0.1 Mask:255.0.0.0 > inet6 addr: ::1/128 Scope:Host > UP LOOPBACK RUNNING MTU:16436 Metric:1 > RX packets:42718 errors:0 dropped:0 overruns:0 frame:0 > TX packets:42718 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:6858552 (6.5 MiB) TX bytes:6858552 (6.5 MiB) > > root@debian:/home/michael# ip route show > default via 210.6.148.1 dev eth2 > 192.168.0.0/24 dev eth1 proto kernel scope link src 192.168.0.1 > 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.1 > 210.6.148.0/25 dev eth2 proto kernel scope link src 210.6.148.56 > root@debian:/home/michael# sysctl net.ipv4.ip_forward > net.ipv4.ip_forward = 1 > root@debian:/home/michael# iptables --list-rules > -P INPUT ACCEPT > -P FORWARD ACCEPT > -P OUTPUT ACCEPT > root@debian:/home/michael# iptables -t nat --list-rules > -P PREROUTING ACCEPT > -P INPUT ACCEPT > -P OUTPUT ACCEPT > -P POSTROUTING ACCEPT > -A POSTROUTING -o eth2 -j MASQUERADE > root@debian:/home/michael# route > Kernel IP routing table > Destination Gateway Genmask Flags Metric Ref Use > Iface default 210006148001.ct 0.0.0.0 UG 0 0 > 0 eth2 192.168.0.0 * 255.255.255.0 U 0 0 > 0 eth1 192.168.1.0 * 255.255.255.0 U 0 0 > 0 eth0 210.6.148.0 * 255.255.255.128 U 0 0 > 0 eth2 > > I can access all the 3 networks from the router. Moreover, I can access the > Internet from all the LANs. However, I can't access the 192.168.1.0/24 > network from the 192.168.0.0/24 network, and vice versa. That means the > packets are not forwarded properly between eth0 and eth1 in the router. > > Now I want to make the 2 LANs accessible to each other, what should I do? -- Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/201110271918.47024.mikl...@gmail.com