This tutorial will explain how to setup and configure a DDoS protected Minecraft Bedrock server on Windows Server 2018. This guide assumes you have already running and access to the Bedrock server you wish to protect.
Step 1: Backend Setup
Setup Bedrock on your server, this server will be from here on referred to as the "backend server". This guide covers a Windows Server setup, however in general we recommend Linux setups where possible.
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 DDoS protection page. We suggest choosing one geographically close to your server location (or your primary user base). We offer numerous locations in the United States and Europe.
During the purchase process you will be asked to:
- Name your service (important if you plan to have many)
- Select the filtering location (choose a location close to your backend server)
- Select an appropriate DDoS protection threshold (choose a value big enough to handle your expected attacks)
- Select the amount of Clean Bandwidth required to run your service (not attack traffic)
Step 3: Encapsulation Setup (Optional)
This step is only required if you are intending to use a GRE, IP-in-IP or IPSec Tunnel. If you are intending to use a Reverse Proxy (RP) style connection (the easiest) then you can skip this step.
A Reverse Proxy only proxies connections to your backend and can be useful for servers that do not require to set bans on player IP addresses or do not have command line skills to set up a network interface (or when using a panel that does not give access to console).
An encapsulated backend requires support on the Backend Server, currently Windows and Linux Operating Systems are fully supported, with partial support for FreeBSD. Most Enterprise or even SOHO Routers also support GRE or IP-in-IP tunneling, if supported you may be able to configure the router to terminate the encapsulated network.
Encapsulated networks can be created from your services "Tunnels" page, the link for which can be found in its Action menu. To create a Tunnel you need to specify the backend servers IP address, as well as depending on the encapsulation type chosen security keys (GRE). If unsure as to the appropriate encapsulation type we recommend using GRE. Alternatively to the form in your dashboard you may also use the form below to create a tunnel, just input details for your backend server and select your service.
We provide scripts / software to install the encapsulated tunnel onto your backend server in the Dashboard. On your services Tunnels page you should see the list of tunnels which have been created. In the action menu for the tunnel there is a page titled "Setup Tunnel", here you can download the provided Linux setup script, or the Windows tunneling software with your configuration built-in.
For more information on GRE/IP-in-IP Tunnels including installation instructions for windows click here.
Step 4: Add Ports
Add the ports required to run your service. In this case, the default port for Bedrock servers is 19132 (UDP) with an additional port 19133 (UDP) also being required. Unlike Java Minecraft bedrock communicates over UDP only. If unsure you can determine what port(s) the service bound to by using the
netstat commands as appropriate.
There is a form in the dashboard for creating ports, this can be found in your services action menu as the "Ports" page. To add a port click the "Add Port" button towards the bottom of the page. Then fill the created form with the values you can see below in the example / integrated form. Alternatively, you can also use the form below to create the port for your service, just configure the appropriate backend by either:
- Selecting the Encapsulated Type, and then the appropriate Tunnel (as created in Step 2); or
- Entering a Backend IP address for a Reverse Proxy style port.
Note: You can use your service to be open to connections on port 19132/19133 and yet have your server run on a non-standard port. This is useful if you have your gameserver hosted on a shared IP on a non-standard port.
Step 5: Encapsulation - Force Bind
This step is only required for Encapsulated (tunneled) setups. If using a Reverse Proxy style setup this step is not required.
Like many applications on Windows Bedrock dedicated server is not able to handle multiple IP addresses. Bedrock sends all outgoing packets via the servers primary IP address. Due to this it is by default incompatible with any remote protection service. The easy fix to this is a utility known as ForceBindIP. We have a guide on using ForceBindIP here.
Once you have followed this guide and downloaded and installed the utility you can run the Minecraft Bedrock dedicated server via the command (where 10.x.x.x is your local tunnel IP):
ForceBindIP64 10.x.x.x bedrock_server
NOTE: Be sure to run the 64-bit version of ForceBindIP as bedrock is distributed as a 64-bit application. You can verify it worked successfully by executing in a Command Prompt window:
netstat /a -p udp and looking for a row similar to:
UDP 10.x.x.x:19132 *:*
Step 6: Finish & Test
Once all steps are completed and the progress bar for deployment of the configuration reaches 100% you should be able to connect to your service on your Filtered IP.
This Filtered IP is the address that you should use in any DNS names, or supply to any connecting users. All traffic which arrives at configured ports on a Filtered IP will be filtered for attack, and then forwarded to your configured backend server.
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.