2

Background:

Let me start by saying that networking is not my strongest suit, so I might be missing some details here which I'm happy to provide if needed.

My company uses Zscaler VPN software which is currently only available for Windows and not Linux.

I've been trying to set up a bridge between my Linux host and Windows guest to access the VPN in Linux but without luck so far.

Setup:

My host is running Kubuntu 19.10 with VirtualBox 6.0 and is connected to a wifi network. The guest VM is running Windows 10 Home and is set up to connect to the network using a bridged connection.

Windows VM settings:

Adapter 1:
Type: Bridged
Name: wlp2s0

Adapter 2:
Type: Host-Only
Name: vboxnet1

Windows network config:

enter image description here

  • Ethernet is the default adapter with internet connection from the host
  • Ethernet 2 is Host-Only adapter I set up in VirtualBox

  • Ethernet 3 is the Zscaler VPN adapter

Routing steps:

In Ubuntu, I ran the following commands to set up a route:

Add local IP alias:

sudo ip a add 192.168.100.2/24 dev vboxnet1

Adding route (192.168.150.71 is the address I want to access through VPN):

sudo ip route add 192.168.150.0/32 via 192.168.100.1 dev vboxnet1

Output of ip route:

default via 192.168.1.1 dev wlp2s0 proto dhcp metric 600 
169.254.0.0/16 dev wlp2s0 scope link metric 1000 
192.168.1.0/24 dev wlp2s0 proto kernel scope link src 192.168.1.8 metric 600 
192.168.100.0/24 dev vboxnet1 proto kernel scope link src 192.168.100.2 
192.168.150.0 via 192.168.100.1 dev vboxnet1 

output of ip addr:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 5c:80:b6:30:a4:76 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.8/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp2s0
       valid_lft 83279sec preferred_lft 83279sec
    inet6 fe80::6792:aa03:5551:9b72/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
5: br-6926c7d5e0a0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:d4:3c:61:43 brd ff:ff:ff:ff:ff:ff
    inet 172.22.0.1/16 brd 172.22.255.255 scope global br-6926c7d5e0a0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:d4ff:fe3c:6143/64 scope link 
       valid_lft forever preferred_lft forever
6: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:ab:02:07:3b brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
2823: veth4b520eb@if2822: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-6926c7d5e0a0 state UP group default 
    link/ether 42:f7:df:30:3c:16 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::40f7:dfff:fe30:3c16/64 scope link 
       valid_lft forever preferred_lft forever
2112: enx9cebe8755d5b: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 9c:eb:e8:75:5d:5b brd ff:ff:ff:ff:ff:ff
2275: vboxnet1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 0a:00:27:00:00:01 brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.2/24 brd 192.168.100.255 scope global vboxnet1
       valid_lft forever preferred_lft forever
    inet6 fe80::800:27ff:fe00:1/64 scope link 
       valid_lft forever preferred_lft forever

Connection test:

In Windows:

$ nc -vz 192.168.150.71 30845
Connection to 192.168.150.71 30845 port [tcp/*] succeeded!

In Ubuntu:

$ nc -vz -w 10 192.168.150.71 30845
nc: connect to 192.168.150.71 port 30845 (tcp) timed out: Operation now in progress

I can successfully ping my Windows VM through the new virtual adapter:

$ ping 192.168.100.1
PING 192.168.100.1 (192.168.100.1) 56(84) bytes of data.
64 bytes from 192.168.100.1: icmp_seq=1 ttl=128 time=0.297 ms
64 bytes from 192.168.100.1: icmp_seq=2 ttl=128 time=0.322 ms

What am I missing? :S

1
  • You may want to follow the answer on this post: link Commented Aug 18, 2021 at 21:07

0

You must log in to answer this question.

Browse other questions tagged .