Enable IP Forwarding.
Ive got a gentoo box that has multiple NICs, on a network that has both WAN and LAN IPs.
The gentoo box has 2 WAN (81.x.x.x) and 1 LAN ip (192.168.2.x) IP. These are all connected through the same switch and theres also the adsl modem/router plugged into the switch as well.
From any LAN workstation, I can ping the 81.x.x.x IPs fine on the gentoo box when i take down the 192.168.2.x interface, however when its up i cant get them to talk.
Anyone know the correct syntax for the 'route add' statement I need to get this working?
Enable IP Forwarding.
It is ?ardvue ~ # cat /proc/sys/net/ipv4/ip_forward
hmm ok. Can you post the results of 'ifconfig' and 'route' please?
Code:eth3 Link encap:Ethernet HWaddr 00:1B:21:0A:B7:6E inet addr:192.168.2.4 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::21b:21ff:fe0a:b76e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:14911615 errors:0 dropped:0 overruns:0 frame:0 TX packets:19968310 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1736570850 (1656.1 Mb) TX bytes:2058540052 (1963.1 Mb) Base address:0xd800 Memory:ed800000-ed820000 eth4 Link encap:Ethernet HWaddr 00:40:F4:70:D6:11 inet addr:188.8.131.52 Bcast:184.108.40.206 Mask:255.255.255.248 inet6 addr: fe80::240:f4ff:fe70:d611/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2312227 errors:0 dropped:0 overruns:0 frame:0 TX packets:416997 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:776135799 (740.1 Mb) TX bytes:45895521 (43.7 Mb) Interrupt:10 Base address:0xe000i dont have iptables installed or configured if that makes any difference?Code:Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 220.127.116.11 0.0.0.0 255.255.255.248 U 0 0 0 eth4 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 18.104.22.168 0.0.0.0 UG 0 0 0 eth4
Last edited by RabbieBurns; 13th May 2008 at 12:47 PM.
Your routing looks fine. What are the network settings of your client machines?
they get a 192.168.2.x ip dished up from dhcp running on another gentoo box with the same setup (wan and lan IPs) and the DNS is set to the LAN ips of each of the 2 gentoos, and default gateway is the 192.168.2.1 interface on the adsl modem/router
ok, what exactly are you trying to do here? As there's nothing wrong with that setup. Do you need the LAN clients to be able to access the WAN? If so you'll have to NAT (or is your DSL router doing that?)
yeh i need the lan clients to be able to access the wan IPs - which works - there is no problem accessing the wan IPs on devices with just the WAN ips, its the machines with both a wan and a lan IP that the problem is). NAT etc is all fine. As soon as i bring down the 192.blah interface on a box i can then ping the WAN ips of that box fine. As soon as the 192.blah interface is back up, no ping replies.
Ok, to make this work you must alter the routing on your default gateway (the DSL router) so that it knows that 81.x.x.x addresses are internal.
There are currently 1 users browsing this thread. (0 members and 1 guests)