Set up a VPN connection and redirect traffic through it.
Set up a VPN connection and redirect traffic through it.
You can set up a private virtual machine and use a VPN to route traffic through your own network. This way, visitors can access the game server using its public IP from the VPS instead of your personal one.
The concept involves users linking to a VPS, which serves as a proxy, sending data to their PC via a VPN. You might expect this to function, though you should be aware that a VPN will likely introduce significant delays. It’s often more efficient to host the game server directly on the VPS. You’ll need a VPN connection between your home server and the VPS, ensuring both can communicate over the network (for example, using a ping test). After setting this up, configure firewall rules on the VPS to allow traffic on specific ports from your home server.
I’ve tried this myself and it works often. I rent an AWS EC2 instance with OpenVPN, and whenever I need to forward ports, I connect to the server and configure iptables to route traffic through the VPN to my PC. For more steps, check out the guide here: https://github.com/lost1227/ovpn-port-forward