1

I have this scenario.

4 VM Debian8 : 1 DHCP 1 DNS 1 GW 1 Client

I can ping from all my VM (except GW) each other (@ip or hostname).

My GW have 2 interfaces (eth0->LAN / eth1->WAN). From it I can ping google.fr but I cannot ping my LAN (except with @ip).

In the file /etc/resolv.conf I have the DNS form my box on the WAN. If I put the conf of my LAN it's the reverse (of course). I can ping my LAN but not WAN.

I activated ip_forward and I know I have to do some work with route but I have to admit I don't really understand the command for route.

Can you explain me the logic of this ?

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.84.254  0.0.0.0         UG    0      0        0 eth0
0.0.0.0         192.168.10.2    0.0.0.0         UG    0      0        0 eth1
192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.84.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0

1 Answer 1

3

The LAN interface of your gateway VM should not have a gateway defined in /etc/network/interfaces. The gateway represents the default route to the Internet, and you have only one such route (via WAN, not LAN). Remove it, and then restart networking.

2
  • I didn't have a gateway set on /etc/network/interface. I set it via route add default gw 192.168.84.254 eth0. Now I /etc/init.d/network restart but I don't have ip set fort eth0 AND eth1. I just have lo=lo in /var/run/network/ifstate
    – Ragnar
    May 25, 2015 at 22:46
  • I had to reboot to fix it
    – Ragnar
    May 25, 2015 at 22:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .