Hyper-v - Ubuntu 20.04 - Checkpoint VPN - NAT not working

%3CLINGO-SUB%20id%3D%22lingo-sub-2057329%22%20slang%3D%22en-US%22%3EHyper-v%20-%20Ubuntu%2020.04%20-%20Checkpoint%20VPN%20-%20NAT%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2057329%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20follow%20this%20guide%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fvirtualization%2Fhyper-v-on-windows%2Fuser-guide%2Fsetup-nat-network%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fvirtualization%2Fhyper-v-on-windows%2Fuser-guide%2Fsetup-nat-network%3C%2FA%3E%26nbsp%3Bto%20setup%20a%20NAT%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20commands%20should%20be%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3ENew-VMSwitch%20-SwitchName%20%22NATSwitch%22%20-SwitchType%20Internal%0ANew-NetIPAddress%20-IPAddress%20172.16.0.1%20-PrefixLength%2024%20-InterfaceIndex%2074%0ANew-NetNat%20-Name%20NATNetwork%20-InternalIPInterfaceAddressPrefix%20172.16.0.0%2F24%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EThen%20in%20VM%20settings%2C%20I%20choose%20the%20%22Virtual%20switch%22%20%3D%20NATSwitch%3C%2FP%3E%3CP%3EThen%20in%20Ubuntu%20I%20configure%20the%20network%20as%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EIP%20%3D%20172.16.1.10%0ASubnet%3A%20255.255.255.0%0ADefault%20gw%3A%20172.16.0.1%0ADNS%3A%208.8.8.8%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20in%20my%20VM%2C%20the%20network%20is%20unconnected%20(even%20I%20start%20VPN%20or%20not)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20I%20am%20wrong%3F%20please%20help%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

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

0 Replies