I cannot access to a web application running on a virtual machine hosted by KVM from a machine in a different subnet.
So, I would like to access from the machine 192.168.1.2 (top right in green circle) to a web application running on the virtual machine 192.168.10.1 (bottom middle in red circle)
I added a static route on the netgear router in order to all requests to 192.168.10.0/24 are forwarded to the host machine 192.168.1.1.
Host machine itself has a static route to forward requests to 192.168.10.0/24 through the vmbr1 bridge interface
- A telnet on 80 port failed from 192.168.1.2 and succeed from the host machine 192.168.1.1.
- A ping call to virtual machine works from 192.168.1.2 machine to VM
- A traceroute fails but if I add -I option, traceroute works too.
Thanks you in advance for your help or any clue.
PS: I precise that even if firewall is disabled it's doesn't work too.
Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
traceroute from physical machine 192.168.1.2 to VM machine 192.168.10.1 => KO
traceroute to 192.168.10.1 (192.168.10.1), 30 hops max, 60 byte packets 1 192.168.1.254 (192.168.1.254) 2.390 ms 3.004 ms 3.436 ms 2 * * * 3 * * * ... 30 * * *
traceroute from VM Machine 192.168.1.2 to physical machine 192.168.10.1 machine => OK
traceroute to 192.168.1.2 (192.168.1.2), 30 hops max, 60 byte packets 1 192.168.10.254 (192.168.10.254) 0.846 ms 0.648 ms 0.519 ms 2 192.168.1.2 (192.168.1.2) 5.447 ms 5.277 ms 4.977 ms
A ping from 192.168.1.2 machine to VM machine 192.168.10.1:
ping 192.168.10.1 PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data. From 192.168.1.254: icmp_seq=1 Redirect Host(New nexthop: 192.168.1.1) From 192.168.1.254 icmp_seq=1 Redirect Host64 bytes from 192.168.10.1: icmp_seq=1 ttl=63 time=2.77 ms From 192.168.1.254: icmp_seq=2 Redirect Host(New nexthop: 192.168.1.1) From 192.168.1.254 icmp_seq=2 Redirect Host64 bytes from 192.168.10.1: icmp_seq=2 ttl=63 time=2.56 ms
On the host machine, routes are well defined and from this host machine I access to web applications of VM's without any problem.
ip route show
default via 192.168.1.254 dev eth0 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.1 192.168.10.0/24 dev vmbr10 proto kernel scope link src 192.168.10.254 192.168.20.0/24 dev vmbr20 proto kernel scope link src 192.168.20.254
When I plug directly the 192.168.1.2 machine (source machine) to the router with a RJ45 cable, it works. Before 192.168.1.2 was connected to router by Wifi. So I think that it's a problem with this router that not apply well static route to machine connected by Wifi. I don't know why but that's weird :S