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:

  ether 0a:00:27:00:00:02
  inet netmask 0xffffff00 broadcast

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

vboxnet2 is using by VirtualBox with Windows 7 and have IP

I wanna route all traffic trough VPN connection utun2 from vboxnet2 (or specifically from 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 mtu 1500 netmask up

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

May be it can help. Thanks.

Related Questions