-1
System Configuration:
Virtual Box version: VirtualBox-6.1.6-137129-Win
Host OS: Windows 10
Guest OS: Oracle Linux 8.1 (Virtual Box Guest Additions not installed in it yet)

VPN Software running on Host OS (Windows 10):
Cisco AnyConnect Secure Mobility Client
Version: 4.8.02045
Preferences of VPN Client: Screen Shot Attached

Internet Connectivity on Host OS is through WiFi interface Intel(R) Wireless-AC 9560 160MHz connected to my Home router.

I have configured Guest VM i.e. Oracle Linux with just 1 NAT network interface (with default settings nothing modified), when the host is not connected to VPN my Guest VM i.e. Oracle Linux is able to use hosts network i.e. I am able to browse Internet from Oracle Linux.

  • IP Configuration screen shot attached of Oracle Linux when VPN not connected in Host.
  • route print command executed on host machine (i.e. windows 10) output also attached before VPN connection.

Now I thought that I will make a connection to VPN from Host OS (i.e. Windows 10) and my Guest OS (i.e. Oracle Linux) should be also able to access the same VPN connection with the configured NAT interface but instead when Host makes a VPN connection Guest OS is not able to use any of the VPN resources neither the Internet. Nothing seems to be working. I tried taking wireshark dump on Oracle Linux machine after VPN connect but there nothing captured in wireshark at all totally blank.

  • IP Configuration screen shot attached of Oracle Linux when after VPN is connected in Host.
  • route print command executed on host machine (i.e. windows 10) output also attached after VPN connection.

  • VBox.log files also attached

    Procedures I tried to troubleshoot the issue:

    • Tried Using older version of Virtual Box 5.2 but still found same issue there.
    • Tried using older version of Virtual Box 6.1.4 with and without VBoxGuestAdditions_6.1.7-137622 but still same issue there.
    • I wanted to install VBoxGuest Additions as mentioned in ticket virtualbox . org / ticket /19336 but link shared to patched VBoxGuestAdditions_6.1.97-136310.iso in the ticked is broken not accessible.
    • Executed below commands collectively and one-by-one also but still issue persists:

      C:\Program Files\Oracle\VirtualBox> VBoxManage modifyvm "VM name" --natdnshostresolver1 on

      C:\Program Files\Oracle\VirtualBox> VBoxManage modifyvm "VM name" --natdnsproxy1 on

      C:\Program Files\Oracle\VirtualBox> VBoxManage setextradata global VBoxInternal2/HostDNSSuffixesIgnore 1

    • Tried Installing Cisco AnyConnect Directly in Guest OS(Oracle Linux), it shows that it is connected but still can't access Internet or any VPN sites.

If I configure Oracle Linux VM network adapter as Bridged then atleast I have internet connectivity on Oracle VM, when VPN is connected on windows host, but the goal is to use the same VPN connection to which Host System i.e. Windows 10 is connected.

Any help regarding this issue would be great.

All the logs can be downloaded from this link.

2

3 Answers 3

0

I was able to fix the issue by using proxy settings in my Guest OS same as my host OS:

Steps to resolve:

  1. In Host OS (Windows 10), Go to control panel and type in search bar "proxy"
  2. Click Configure Proxy server option, this will open Connections Tab in Internet Properties dialog.
  3. Click LAN Settings Button and copy the link in the Address text box.
  4. Now go to Guest OS that is Oracle Linux here, and open Network Settings.
  5. Click configure Network Proxy Button and select radio button named "Automatic"
  6. Finally paste the URL link copied on step 3 in the given text box.
  7. Disable and Enable the connection and voila Guest OS now able to use host VPN connection.
1
  • Seems like sometimes organisations make use of proxy's which need to be taken care in guest OS
    – mSatyam
    May 11, 2020 at 14:38
0

I was able to obtain connectivity to the internet from inside my virtual box machine with the following setup:

  • Host: Mac OS Catalina 10.15.7
  • Guest: Linux debian 4.19.0-12
  • In my host machine I have the Mullvad VPN app installed and activated.
  • I'm using a ethernet connection on my mac.
  • Virtual box network type is: Nat, with the Adapter type of Intel PRO/1000 MT Desktop

This is the configuration you need on your Debian/Linux machine:

In the network manager applet (top right corner) click the connection settings.

You need everything there in "automatic". I had a custom Open DNS setting before and that was causing the guest machine to not be able to resolve anything.

IPv4 tab

Turn off and back on the network connection so the changes take effect.

Turn off and back on the network connection

With this setup applied, when you check the first tab ("details"), you will see that, smartly, the DNS gets autopopulated for you with mullvad's SOCKS5 proxy and also the default route gets populated for you.

Details tab

Open a terminal window and you should now be able to:

  1. Ping 8.8.8.8: This means your default gateway route is working
  2. Ping google.com: This means your DNS setting is working
0

For me the alternate way to have at least internet connectivity on guest VM (VMware or VirtualBox with NAT adapter in my case) is to use on host OpenConnect GUI VPN client instead of Cisco Anyconnect client, because OpenConnect client doesn't perform such an aggressive traffic forwarding as Anyconnect does.

FYI OpenConnect supports the same protocol as Anyconnect. Also when running OpenConnect on host, I can also successfully run OpenConnect on guest VM to connect to VPN, thus I will have VPN on both (host and guest). List of GUI tools for OpenConnect for all platforms hosted here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .