FIX: VPN not working on VirtualBox [4 easy solutions]

by Elena Constantinescu
Elena Constantinescu
Elena Constantinescu
VPN Expert & Privacy Advocate
Elena started writing professionally in 2010 and hasn't stopped exploring the tech world since. With a firm grasp of software reviewing and content editing, she is always trying... read more
Affiliate Disclosure
  • VirtualBox is a free and intuitive tool that turns your PC into a virtual machine and lets you run any operating system. It also supports VPN connections.
  • Several users have reported that their VPN doesn't work properly on VirtualBox. If you're one of them, discover 4 easy solutions below.
  • Discover more about VirtualBox to master this OS virtualization tool.
  • Visit our VPN Troubleshooting Hub to solve more VPN issues.
fix VPN not working on VirtualBox
To fix various PC problems, we recommend DriverFix:
This software will keep your drivers up and running, thus keeping you safe from common computer errors and hardware failure. Check all your drivers now in 3 easy steps:

  1. Download DriverFix (verified download file).
  2. Click Start Scan to find all problematic drivers.
  3. Click Update Drivers to get new versions and avoid system malfunctionings.
  • DriverFix has been downloaded by 0 readers this month.

VirtualBox is an awesome virtual machine tool.

It turns your PC into an OS emulator for various platforms and operating systems, including older Windows versions, Linux, and Mac. And it’s completely free to use.

Since VirtualBox supports VPN, a lot of users turn to it as a solution for securing their network connection.

But VPN connections don’t always work on VirtualBox.

Here’s a relevant message from the VirtualBox forum:

Hello, I have installed Windows XP on a Virtual Box space, everything is ok but when i tried to access the VPN it didn’t want, this is the first time i try to access the VPN with the Virtual Box, with my normal PC to ISP the VPN works great, but it doesn’t want to get connected through Virtual Box Windows XP image. Please help. Thank you

zakaria on VirtualBox forum

Resolve the problem by following the steps we listed below.

Why I cannot access VPN through VirtualBox?

Enable Paravirtualization in NAT adapter

vpn not working on virtualbox
  1. Launch VirtualBox and go to Settings > Network
  2. Find and select Adapter
  3. Set Attached to NAT
  4. Click on Advanced and select Adapter type: Paravirtualized Network
  5. Enable VPN service on the host PC and start the virtual machine

Once done, you should be able to use the VPN of the host computer on the guest computer or virtual machine.

Switch to DNS proxy

  1. Run VirtualBox on the default NAT setup
  2. Open a terminal inside VirtualBox
  3. Copy and paste the following line to enable DNS proxy:
VBoxManage modifyvm "VM name" --natdnsproxy1 on

If the DNS solution doesn’t make your VPN work properly with VirtualBox, proceed to the next.

Install two network adapters (NAT & Host-Only)

  1. Set up a NAT adapter
    • This allows the guest PC to share the host VPN network and other related settings. However, your virtual engine (guest computer) would still be unable to access connections on the host computer.
  2. Set up a Host-Only networking adapter
    • It will fix the previous problem and provides you with an IP address that can be accessed from the host PC. Then, you should be able to connect to the host’s VPN network.

You should now have a two-way connection, between both computers (virtual and actual). Consequently, VPN network sharing is made easy.

Use a VPN client

If you’re looking for an easy solution to bypass the VPN connection issue with VirtualBox as well as to protect your online privacy, consider using a premium VPN client.

All you have to do is download and install a VPN app, connect to a VPN server, and then open your virtual machine. And we can’t think of a better option than Private Internet Access (PIA).

PIA supports numerous VPN servers, a zero-logging privacy policy, WireGuard and OpenVPN protocols. It allows 10 simultaneous device connections and works flawlessly with Private Internet Access.

More about PIA:

  • Made for Windows, Mac, Linux, Android, iOS, and routers
  • Exclusive DNS servers
  • Split tunneling and kill switch
  • 24/7 live chat support
  • 30-day money-back guarantee
  • No free trial
Private Internet Access

Private Internet Access

Use this reliable VPN before firing up VirtualBox, in order to secure your device and protect your online privacy.

Check priceBuy it now


To summarize, you shouldn’t worry if your VPN connection fails to work with VirtualBox. Instead, you can enable Paravirtualization in the NAT adapter or switch to DNS proxy mode.

You can also set up two network adapters for NAT and Host-Only. But the best way to remain secure and anonymous online is by turning to a reliable VPN service like Private Internet Access (buy here).

Your connection is not secure - websites you visit can find out your details:

  • Your IP
  • Your IP Address:

Companies can sell this information, alongside your location and internet provider name, and profit from it by serving targeted ads or monitoring your data usage.

Use a VPN to protect your privacy and secure your connection.

We recommend Private Internet Access, a VPN with a no-log policy, open source code, ad blocking and much more; now 79% off.

This article covers:Topics: