Can't connect to gameserver over self hosted Reverse Proxy Server reddit / selfhosted ---------------------------------------------------------------------- AlphaFabiii · 2023-10-31 13:37 Hello Guys, I am running a home server and some applications I host to the Internet. Now I want to enhance the secruity of my network and started to proxy my applications, such as a selfhosted 2FA and a search engine through Cloudflare, which works fine for these kinds of applications. But as I tried to proxy a gameserver through Cloudflare, I found out, that Cloudflare only supports proxying through certain ports, and Server-Ports like Factorio or Minecraft (34197, 25565) are not supported in the free Plan. At the moment, I have an SRV record in place which redirect incoming traffic from [games.example.com](https://games.example.com) over the right port to my gameserver. But that's not a permanent solution I want to use and it is just pointing at my home ip, so not the safest. My Idea then is, rent a small vServer, install a Reverse-Proxy like NginxProxyManager and establish a secure VPN connection with Wireguard between my gameserver and my selfhosted Reverse Proxy. The connection is working and when I check my Gameserver's IP, when I'm connected with the VPN, I have the IP of my rented server. But I can't get a connection to my Gameserver. I attempted it with the domain, with the IP of the rented Server with and without the RP running but I cant get to my gameserver. That's my wg0 config for the Proxy/Rent Server: `[Interface]` `Address =` `10.0.0.1/32` `SaveConfig = true` `PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE` `PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE` `ListenPort = 51830` `PrivateKey = ` ​ `[Peer]` `PublicKey = ` `AllowedIPs =` `10.0.0.2/32` `Endpoint = ip of my homenetwork:port` and for the Client/gameserver: `[Interface]` `PrivateKey = ` `Address =` `10.0.0.2/24` ​ `[Peer]` `PublicKey = ` `Endpoint = proxy``:``51830` `AllowedIPs =` `0.0.0.0/0` `PersistentKeepalive = 25` The Proxy Manager is working but I couldn't figure out, what the right settings are, that if someone wants to connect to my gameserver via [games.example.com](https://games.example.com) , that the PM routes the traffic trough the Wireguard Tunnel to my gameserver. My Webhoster told me, the ports on the Server are not restricted, so there shouldn't be a blockage either. If anyone has an Idea on how to get it working with this setup or has a different approach, please let me know. ​ ---------------------------------------------------------------------- thekrautboy · 2023-10-31 14:46 Reverse proxy servers typically proxy web services (things like websites, over HTTP/HTTPS/TCP etc). Gameservers are not the same as a website. You should ask subs that are specific to the actual game if someone has made a tool that works with that game, or in a rare case, if a specific existing reverse proxy can be made to work with it. ---------------------------------------------------------------------- indykoning · 2023-11-01 21:26 As thekrautboy said gameservers are not the same as websites so a web proxy does not work. You'll need a game specific proxy. I've used https://github.com/haveachin/infrared for Minecraft with success but that was on the same docker network