Trace: vps_server

How to Set Up a VPN to Host NFSU

This is an old revision of the document!


How to Host NFS Underground Without a Public IPv4 (Using a VPS Relay)

This tutorial has not been tested. Use it with caution, and if anyone notices a mistake, please feel free to correct it.

Many players today cannot host old games like NFS Underground directly because their home connection lacks a public IPv4 address.
However, you can still host by using a VPS (Virtual Private Server) as a relay. This guide explains step-by-step how to do it on a LInux VPS Server.

Estimated Setup Time: ~25–40 minutes.

Step 1 - Rent a VPS

- Get a small Linux VPS with a dedicated IPv4 (~€1–3/month)
- Make sure you have SSH (Linux) or RDP (Windows) access

Step 2 - Install Relay Software (Linux example)

sudo apt update
sudo apt install socat screen -y
# socat will forward the game ports from the VPS to your PC

Step 3 - Prepare Your PC

- Assign a static LAN IP (e.g., 192.168.1.100)
- This ensures the VPS always knows where to send game data
- Make sure your firewall allows UDP ports 3658–3659 (NFS Underground default)

Step 4 - Set Up Port Forwarding on the VPS

# Forward the UDP ports to your PC
socat UDP4-RECVFROM:3658,fork UDP4-SENDTO:192.168.1.100:3658 &
socat UDP4-RECVFROM:3659,fork UDP4-SENDTO:192.168.1.100:3659 &

Step 5 - Keep the Relay Running

- Use screen or tmux to keep socat running:
screen -S nfsrelay
# run socat commands
# detach with Ctrl+A, D
- Optionally, configure socat as a systemd service to start automatically on VPS boot

Step 6 - Open VPS Firewall

sudo ufw allow 3658/udp
sudo ufw allow 3659/udp
sudo ufw enable
# only open necessary ports for security

Step 7 - Start Hosting

- Launch NFS Underground on your PC
- The game registers in the lobby automatically
- Players connect using the VPS public IP, but the game actually runs on your PC
- No extra software is needed for players

Tips

- Test first with 1-2 friends to make sure everything works
- Ensure your PC has a static LAN IP
- Only forward necessary UDP ports (3658-3659)
- Multiple VPS relays can be set up if needed