Firewall Setup
DNS points players at NeoProtect, but your backend can still be reached directly if someone learns its IP. A firewall closes that gap: it blocks all incoming traffic except from NeoProtect, so attackers cannot bypass your protection.
This guide covers three ways to do it — UFW, iptables, or our automatic setup script. Pick whichever you are comfortable with.
1. Using UFW
Step 1: Install UFW
sudo apt update
sudo apt install ufwStep 2: Block all incoming traffic
sudo ufw default deny incomingStep 3: Allow NeoProtect IPs
Get the current NeoProtect IP list, then run this once for each IP:
sudo ufw allow from <ip>Step 4: Allow SSH connections
So you do not lock yourself out of your own server:
sudo ufw allow sshStep 5: Enable UFW
sudo ufw enable2. Using iptables
Step 1: Block all incoming traffic
sudo iptables -P INPUT DROPStep 2: Allow NeoProtect IPs
Get the current NeoProtect IP list, then run this once for each IP:
sudo iptables -A INPUT -s <ip> -j ACCEPTStep 3: Allow SSH connections
So you do not lock yourself out of your own server:
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPTStep 4: Save the iptables rules
sudo iptables-save > /etc/iptables/rules.v43. Using the NeoProtect script
To skip the manual steps, download and run our script. It configures your firewall to allow only NeoProtect IPs for you:
curl -sSf https://neoprotect.net/firewall | bash4. Verify your firewall
After setup, check that the rules are active:
- UFW:
sudo ufw status - iptables:
sudo iptables -L
Confirm that only NeoProtect IPs are allowed, and that your own IP can still reach SSH.