-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network Address Translation and Internet Connection Sharing not required? #131
Comments
Hey @JP95Git wow that is very interesting! I wonder if there is some remnant of NAT left over that makes this work (but isn't "enough" for WS4W to detect it). Sounds like things are in a "good" state, so I wouldn't touch it too much. 😆 Hyper-V is definitely needed initially. WS4W only shows you the prompt to enable it if it gets back an error from Windows, so that's not like something it's making up. Just for fun, try running some of these commands in an admin PowerShell and see what you can find. Get-NetNat -Name wg_server_nat
Get-NetIPAddress -InterfaceAlias wg_server
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V |
Yes, it is a strange situation, but it works. Even a restart of the server did not break it. I backed up my configuration and decided not to touch it. My issues was more of a question "how is this possible?". Here are the results of the commands (my Windows in in German, so some texts are in German too): PS C:\WINDOWS\system32> Get-NetNat -Name wg_server_nat
PS C:\WINDOWS\system32> Get-NetIPAddress -InterfaceAlias wg_server
PS C:\WINDOWS\system32> Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
I uninstalled Hyper-V by using "Windows-Funktionen aktivieren oder deaktivieren" ("Turn Windows features on or off"). |
Interesting, so Windows does not see any NetNat network for that adapter. And just to check, you are able to access other machines on the LAN and the Internet through WireGuard? I'd say you discovered a very interesting loophole! 😆 |
All traffic should be routed through Wireguard because I have 0.0.0.0 as allowed IPs. For this test I took my smartphone and went to the park. I used mobile data and connected to my Wireguard at home. I can see the web interface of my router, I can access all my other devices (server and laptop) using RDP and I can access the internet. Pages like whatismyipaddress.com show the IP from my router at home. |
This "feature" was probably due a bug in Windows, because it no longer works. Perhaps it was fixed with one of the recent updates from Microsoft. I am now using internet sharing. |
I am using Windows 10 22H2 Pro and tested WS4W 2.0.10. I got green check marks for everything. I had to enable Hyper-V to use NAT. Due the usage of Hyper-V all my virtual machines in VirtualBox were extreme slow (this is a known issue with Hyper-V). So I uninstalled Hyper-V and my virtual machines were fast again, but the green check mark next to NAT switched to a red X.
Even with Network Address Translation and Internet Connection Sharing are both disabled, everything works: I can connect from Android and Windows to my 2 devices: A router (FritzBox) and my server (the one running WS4W). I also read the issues #18 and #30 but those did not explain why everything works for me.
The text was updated successfully, but these errors were encountered: