This tutorial will explain how to setup and configure a DDoS protected FiveM server. This guide assumes you have already running and access to your FiveM server you wish to protect.
Step 1: Backend Setup
Setup FiveM on your server, this server will be from here on referred to as the "backend server". On the backend server you may use whichever Operating System you are most familiar with, however if unsure we recommend Centos Linux.
Please ensure that the service is running and connectible on the backend server.
Step 2: Purchase DDoS Protection Service
Pick a suitable package from the FiveM DDoS protection page.
During the purchase process you will be asked to:
1. Name your service (important if you plan to have many).
2. Select the IPs and Ports you wish to protect.
You will receive an E-mail in about 3 ~ 5 hours with your new Filtered IP and also it will appear in your Client area in FiveM Service Section.
Step 3: Setup and configuration
After receiving you new Filtered IP, it's Time to Configure your backend Server.
1. Go to https://keymaster.fivem.net/ and generate a new key for your new Filtered IP.
2. Now, Let's Edit Server.cfg file.
# Only change the IP if you're using a server with multiple network interfaces, otherwise change the port only. endpoint_add_tcp "0.0.0.0:30120" endpoint_add_udp "0.0.0.0:30120" # These resources will start by default. ensure mapmanager ensure chat ensure spawnmanager ensure sessionmanager ensure fivem ensure hardcap ensure rconlog ensure scoreboard sv_scriptHookAllowed 0 # Set your server's hostname sv_hostname "FXServer, but unconfigured" set temp_convar "hey world!" add_ace group.admin command allow # allow all commands add_ace group.admin command.quit deny # but don't allow quit add_principal identifier.fivem:1 group.admin # add the admin to the group sv_endpointprivacy true onesync_enabled true sv_maxclients 32 set steam_webApiKey "" # License key for your server (https://keymaster.fivem.net) sv_licenseKey changeme
Replace "changeme" with your new key.
Step 4: Finish & Test
Once all steps are completed you should be able to connect to your service on your Filtered IP with the Direct Connect.
Note: If you (or your network provider) run a firewall either ensure the Backend Communication address (unless otherwise specified, your filtered IP) is whitelisted or that the firewall is disabled.