1

The host (Windows 11) is using v2ray protocol proxy, I want the virtual machine (Ubuntu 22.04) to use the same proxy so that they can both access free internet. Is there any way to connect the two together?

I have tried changing connection type from NAT to Bridged mode on the virtual machine (Ubuntu 22.04) and it didn't help.

Please note that I have severe limitations on updating and installing packages from the internet on the VM (Ubuntu 22.04) because of internet conditions. Thank You.

1 Answers1

0

So, I managed to solve the issue on my own. Here are the steps required:

  1. Enabled IP forwarding on all virtual network adapters. (not sure if necessary)
  2. Found the host's IP. In my case it was something like 192.1.1.127.
  3. Noted the exact port on which the proxy was running in the host.
  4. Went to the VM and set the default gateway to the host IP and set the port to exact number on which the proxy was running on the host.

I did all this a few weeks ago so I don't remember the exact commands for this but anyone reading this should be able to do it without the pain and struggles that I went through. BTW, only the first step required a few commands which enable forwarding on all virtual NICs and I'm not sure if it was necessary for this to work. The VMware network mode was on NAT also, which is the default. You can literally do the fourth step via the menu and going to network adapters and set the default gateway there.