Code Monkey home page Code Monkey logo

Comments (5)

JP95Git avatar JP95Git commented on July 27, 2024 2

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.

from wgserverforwindows.

JP95Git avatar JP95Git commented on July 27, 2024 1

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.

from wgserverforwindows.

micahmo avatar micahmo commented on July 27, 2024

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

from wgserverforwindows.

JP95Git avatar JP95Git commented on July 27, 2024

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

Get-NetNat : Fehler beim Laden des Anbieters
In Zeile:1 Zeichen:1
+ Get-NetNat -Name wg_server_nat
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (MSFT_NetNat:root/StandardCimv2/MSFT_NetNat) [Get-NetNat], CimException
    + FullyQualifiedErrorId : HRESULT 0x80041013,Get-NetNat

PS C:\WINDOWS\system32> Get-NetIPAddress -InterfaceAlias wg_server

IPAddress         : 10.253.0.1
InterfaceIndex    : 53
InterfaceAlias    : wg_server
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : 24
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Preferred
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
PolicyStore       : ActiveStore

PS C:\WINDOWS\system32> Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V

FeatureName      : Microsoft-Hyper-V
DisplayName      : Hyper-V-Plattform
Description      : Enthält die Dienste, mit denen Sie virtuelle Computer und die zugehörigen Ressourcen erstellen und verwalten können.
RestartRequired  : Possible
State            : Disabled
CustomProperties :

I uninstalled Hyper-V by using "Windows-Funktionen aktivieren oder deaktivieren" ("Turn Windows features on or off").

from wgserverforwindows.

micahmo avatar micahmo commented on July 27, 2024

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! 😆

from wgserverforwindows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.