micahmo / WgServerforWindows

Wg Server for Windows (WS4W) is a desktop application that allows running and managing a WireGuard server endpoint on Windows
MIT License
818 stars 78 forks source link

Which adress should i use to port forward? #120

Closed koeliga closed 9 months ago

koeliga commented 1 year ago

Hello, first of all thanks for making this program. If it wasn't for this I would have no clue what to do.

Some context: When I'm at home I use remote desktop connection on my laptop so I can control my desktop from my bed with my laptop. This works only on lan ofcourse and therefore I want to use wireguard to make it possible to use remote desktop connection from a different wifi connection than my home one. I use windows 10 on both my laptop and desktop pc

So what should I put in the fields for begin point and end point? Also is the server ip address different than my deskoppc address or are they the same? I know how to find my desktop pc and laptop address but I don't know how to find the server one nor I know which addresses I should be inputting in the fields.

image

micahmo commented 1 year ago

Hi @koeliga,

This is a great use case, and I'd be happy to help you set it up.

The WireGuard server should be running on your desktop machine on port 51820 (or whatever you put in Server Config > Listen Port). You could map that to a different public (WAN) port, but there's not really a big reason to do that. Therefore, you can use the same value (51820) for Local start, Local end, External begin, and External end port. For Local IP, use the local IP address of your desktop machine.

Then create a client, export the config file, and load it into the WireGuard desktop app on your laptop. I won't go into detail, but feel free to ask any questions.

Once the tunnel is connected on the laptop, you should be able to RDP to your desktop's local IP address like you would if you were on the same network, assuming your Client Config > Allowed IPs is 0.0.0.0/0. Note that this will route all web traffic from your laptop through your desktop while the tunnel is active.

Hope that helps!

koeliga commented 9 months ago

Sorry for the late reply. I wanted to let you know that I got it to work with your help. So thank you! (you can close the issue, I don't know if I can do it myself)