Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:vps_server [2025/09/27 08:04] ravagetutorials:vps_server [2025/09/28 21:50] (current) – updated video url redhair
Line 1: Line 1:
-======How to Host NFS Underground Without a Public IPv4 (Using VPS Relay)====== +====== How to Set Up VPN to Host NFSU ====== 
-==== This tutorial has not been tested. Use it with caution, and if anyone notices a mistakeplease feel free to correct it====+  - Get the cheapest VPS you can find with a dedicated IPv4 address. 
 +  - Select the latest Debian as the server image. 
 +  - On a freshly installed serverlog in via SSH and run the following command: <code>wget -O - https://nfs.onl/pivpn | bash</code> 
 +  - At the end of the scriptopen the shown URL in a web browser and download the .conf file. 
 +  - Install the WireGuard client from https://www.wireguard.com/install/ 
 +  - Open the WireGuard app. 
 +  - Import the .conf file and click "Activate".
  
-Many players today cannot host old games like NFS Underground directly because their home connection lacks a public IPv4 address.\\ +Done.
-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.+
  
 +Here you can see how it looks: {{youtube>ScveKTwyuV0?large}}
 +As long as you are connected to your VPN, you will be able to host games on an NFSU server.
  
-**Estimated Setup Time:** ~2540 minutes.+Here’s what the fully automated script does: 
 +  - Installs PiVPN with a WireGuard server 
 +  - Creates a configuration for the WireGuard client 
 +  - Sets up port forwarding for UDP 36583659 
 +  - Opens the necessary ports in the firewall 
 +  - Runs a temporary web server so you can download the config file to your PC 
 +  - Saves the firewall settings to make them persistent
  
- 
-==== Step 1 - Rent a VPS ==== 
-- Get a small Linux VPS with a **dedicated IPv4** (~€1-3/month)\\ 
-- Make sure you have SSH 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