Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

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?

Posted (edited)

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:81.123.58.218  Bcast:81.123.58.223  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:0xe000

 

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
81.123.58.216   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         81.123.58.222   0.0.0.0         UG    0      0        0 eth4

 

i dont have iptables installed or configured if that makes any difference?

Edited by rreynolds24
Posted
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
Posted
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?)
Posted
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.
Posted
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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...