Forum Discussion

lapth82's avatar
lapth82
Copper Contributor
Jan 13, 2021

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

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

  • lapth82's avatar
    lapth82
    Copper Contributor

    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

    • jpi90's avatar
      jpi90
      Copper Contributor

      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?

Resources