Jan 13 2021 08:33 AM
Hi all,
I follow this guide https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/setup-nat-network to setup a NAT
My commands should be
New-VMSwitch -SwitchName "NATSwitch" -SwitchType Internal
New-NetIPAddress -IPAddress 172.16.0.1 -PrefixLength 24 -InterfaceIndex 74
New-NetNat -Name NATNetwork -InternalIPInterfaceAddressPrefix 172.16.0.0/24
Then in VM settings, I choose the "Virtual switch" = NATSwitch
Then in Ubuntu I configure the network as
IP = 172.16.1.10
Subnet: 255.255.255.0
Default gw: 172.16.0.1
DNS: 8.8.8.8
But in my VM, the network is unconnected (even I start VPN or not)
What I am wrong? please help
Jan 15 2021 09:43 PM
Still not able to connect by using NAT but using the adapter Internet Connection Sharing feature can resolve it. This is just a workaround, I have to do it everytime I connect to VPN
Feb 24 2023 03:10 AM
Hi @lapth82 , could you explain your solution a bit more? I am trying to connect my ubuntu VM to the VPN, which the client software of the VPN is running on the host machine. Which adapter of the host machine should I configure with Internet Connection Sharing feature?