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

Port Forwarding #133

Open NoChillFM opened 10 months ago

NoChillFM commented 10 months ago

I connected my server to the VPS, but now I want to port forward my server's MC ports and have them under the VPS (DDoS Protection). How exactly would I go about doing that on WS4W?

micahmo commented 10 months ago

Hi @NoChillFM, thanks for the question! I think I'm having a hard time grasping your topology; maybe a simple diagram would help.

Once you're on the WireGuard VPN, you should be able to access the machines/ports on the same LAN, including a port other than the WireGuard port on the same machine hosting the WG server. And that port does not have to be exposed to the WAN or forwarded.

I'm not sure if I captured this very well, but the dotted connection is essentially traveling over the solid one.

flowchart LR
    A[Client Device]
    A -->|UDP/51820| B
    A -.->|TCP/81| B

    subgraph Server
    direction TB
    B[WireGuard]
    C[MC]

    B -.->|TCP/81| C
    end