You may need to access the internet with a VPN for privacy or performance. The most popular VPN solution is Shadowsocks. If you are an IT Pro, you may face a similar issue that I'm facing: How does VM share host VPN connection?
My home lab is running on top of VMware Workstation on a Windows 10 computer. The virtual machines use the NAT network to communicate outside. It goes over the internet through my ISP directly. The performance of AWS or Azure is slow.
I tried Shadowsocks on the Windows 10 computer. The performance is good. But Shadowsocks is not like other VPN solutions. Its only functions for the host computer (The Windows 10 computer). I had to run Shadowsocks client on each virtual machine to get the better speed.
I read an article that is talking about how to share host VPN with VirtualBox. It gave me some ideas. The solution is actully similar:
- Make sure the "Allow Clients from LAN" option is checked in the Shadowsocks client.
- Find out the IP address of the NAT network on VMware Workstation on the Windows 10 computer. (The NIC name is "VMware Network Adapter VMnet8" by default)
- Configure the proxy in a virtual machine. The IP address is the same to step 2's. And the port is 1080 by default.
You don't have to disable the firewall on the host or guest machine. This is a very straightforward configuration to allow VM share host VPN connection.