Hello
Thank you for your question and reaching out. I can understand you are having query\issues related to configure a VPN for virtual machine in Hyper-V
If you need to create a virtual machine with VPN server installed and servicing the "outside world" do the following:
- Create virtual network (Hyper-V -> Virtual Network Manager -> Type: External Network, Name: LAN -> Connect to the physical adapter connected to the internal LAN
- Create virtual network (Hyper-V -> Virtual Network Manager -> Type: External Network, Name: WAN -> Connect to the physical adapter connected to the internet
- Create virtual machine (Hyper-V -> New Virtual Machine -> on the step "Configure Networking" Connection: LAN -> complete the wizard with desired configuration
- Edit the virtual machine configuration (Hyper-V -> select VPN virtual machine -> Right-click - Settings... -> Add Hardware -> Network Adapter -> Network: WAN. Write down the network connections' MAC addresses.
- Start the virtual machine -> Install OS -> Configure IP Addresses and rename the network connections (for better management and config) by noted MAC addresses-> Install Network Access and Protection Role - Select RRAS -> Start RRAS -> Configure -> Custom -> Select VPN Server, eventually NAT => Configure LAN network as a Private Network and WAN as a Public Network
Reference thread:
--If the reply is helpful, please Upvote and Accept as answer--