kemal tamkoc

Offensive Cyber Security Consultant

Routing the WindowsVM VPN to Host without SOCKS

File > Tools > Network Manager Ctrl + H for shortcut.

add a new Host-only network interface.

Screenshot1

set adapter 1 to NAT connection

Screenshot2

set adapter 2 to Host-only connection with created interface

Screenshot3

run ncpa.cpl

Screenshot

after we connected the we VPN we can see the following Pulse Secure interface in here

Screenshot4

enter properties of VPN interface and turn on this checkbox with Host-only (Ethernet 3) interface

Screenshot5

then go to Host-only interface’s properties. and set the ip with 192.168.56.2 and subnet mask 255.255.255.0

Screenshot6

because we have the same subnet with 192.168.56.1 on Host-only interface in host machine

ifconfig vboxnet0

Screenshot7

in windows the final picture is like this:

Screenshot8

now we need to route host’s routes to the VPN tunnel

adding subnets (recommended option)

sudo ip route add 172.16.0.0/12 via 192.168.56.2
sudo ip route add 10.0.0.0/8 via 192.168.56.2
sudo ip route add 192.168.0.0/16 via 192.168.56.2

adding only one ip:

sudo ip route add 172.19.8.18/32 via 192.168.56.2
sudo ip route add 172.19.8.19/32 via 192.168.56.2
sudo ip route add 172.19.8.34/32 via 192.168.56.2

to route all traffic from VPN:

(ATTENTION!) routig all the traffic will delete your default routes. maybe you can not access your internal or the internet. But dont worry restart is the solution xD.

sudo ip route add default via 192.168.56.2

Screenshot9