- Notifications
You must be signed in to change notification settings - Fork 125
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Recently I found that once wireguard server's NAT is enable, I will not able to create a wi-fi hotspot with Internet access.
Why should not use SharedAccess ?
This service is made for hotspot and can only support one NAT instance, meaning that, you will not able to set up a Wi-Fi hotspot with Internet access because SharedAccess services has been occupied by wireguard server's NAT
However, with New-NetNat command, you'll able to set up many NAT instances and keep wi-fi hotspot work.
How to set up NAT with New-NetNat?
Requirements:
- Windows 10 Anniversary Update or later
Hyper-V is enabled (But you can setThere no is need for hyper-v installationhypervisorlaunchtypetooffin bcdedit if you dont want to use hyper-v!)
Disable Internet sharing first.

Then, open powershell with admin permission
# First, get your interface index of wg_server interface Get-NetAdapter # Give a IP to wg_server interface New-NetIPAddress -IPAddress 172.22.0.1 -PrefixLength 24 -InterfaceIndex 68 # Your interface index here New-NetNat -Name wgservernat -InternalIPInterfaceAddressPrefix 172.22.0.0/24 # Your NAT name and interface CIDR here Get-NetNat # For test purpose, you can disable SharedAccess service and will find that NAT is working still .

For more information, check this article
Please note New-NetIPAddress should be executed every time you reboot
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
