Route VirtualBox traffic thought host VPN connection on MacOSX

by SakuradaJun   Last Updated May 21, 2018 11:01 AM

I have following interfaces on MacOSX:

vboxnet2: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
  ether 0a:00:27:00:00:02
  inet 192.168.100.1 netmask 0xffffff00 broadcast 192.168.100.255

utun2: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
  inet 10.14.88.10 --> 10.14.88.9 netmask 0xffffffff

vboxnet2 is using by VirtualBox with Windows 7 and have IP 192.168.100.100

I wanna route all traffic trough VPN connection utun2 from vboxnet2 (or specifically from 192.168.100.100 will be enough).

I guess I should add default GW for vboxnet2.

Which routes I need add to do it?

Also, in VPN connection logs I see that it adds some routes:

2018-05-20 20:05:18 /sbin/ifconfig utun2 10.14.88.10 10.14.88.9 mtu 1500 netmask 255.255.255.255 up

2018-05-20 20:05:18 /sbin/route add -net 10.14.88.1 10.14.88.9 255.255.255.255
                                    add net 10.14.88.1: gateway 10.14.88.9

May be it can help. Thanks.



Related Questions