I'm running Ubuntu inside a VM on my work laptop. I have to run my VPN software on my VM Host system and need access to my VPN network from within my Ubuntu VM.
I can set my VM's network interface to NAT and this takes care of my VPN connectivity issues. I can reach any host inside my work interface via the NAT interface.
In addition to my VPN needs, I would like hots on my LAN to connect to my VM. For example, I want to run a NFS server on my VM that another host on my LAN wants to connect to. (Note -- I don't want a remote VPN host to connect to my VM).
To allow this, I added a second Bridge network interface to my VM. This works fine and I can reach my VM from any other host on my LAN.
The problem with enabling both interfaces is that the NAT interface (VPN) is no longer used, so my VPN hosts becomes unreachable.
I've tried altering the VMWare settings so that the NAT interface is eth0 and Bridged interface is eth1 and vice-versa without any luck.
I assume I need to do something with my routing table to tell Ubuntu to route anything to 192.168.99.255 (my LAN) with ethX and everything else through ethY.
How do I set these rules up? Can I do this via the network connections gui?
Output of route -n is below. 192.168.99.0 is the bridged interface (LAN), .222.0 is the NAT interface.
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.99.1 0.0.0.0 UG 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0 192.168.99.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0 192.168.222.0 0.0.0.0 255.255.255.0 U 1 0 0 eth1