BungeeCord Setup Guide
This guide will help you set up a BungeeCord network using the provided configuration. BungeeCord is a proxy server that connects multiple Minecraft servers, providing a seamless experience across different game modes. It is crucial to set up BungeeCord correctly to ensure network security. By making subservers listen on local system IPs and forwarding traffic through the proxy, you prevent unauthorized access and ensure proper player authentication.
Creating a BungeeCord Server
- Go to Admin > Servers > Create New
- Select “Bungeecord” in the “Minecraft” section of the Nest Configuration.
- Allocate a Public IP address with a port like 19132 if you are using Geyser or 25565 if you are not. For example, let’s use the IP address 192.168.53.72.
- Set the desired server resources and click “Create Server”
Configuring BungeeCord
- Open the
config.yml
file in your BungeeCord installation directory. - Locate the servers section in the configuration file.
- Add your servers under the servers section. For example, let’s add a server called “Hub” with the IP address 172.18.0.1:30000 and a MOTD of your choice. You can modify the server details as per your requirements.
servers:
Hub:
address: 172.18.0.1:30000
motd: Pinging...
restricted: false
Survival:
address: 172.18.0.1:30001
motd: Pinging...
restricted: false
- Define the server priorities under the priorities section. This determines the order in which players are redirected to available servers when connecting to the BungeeCord network. In this case, we only have one server, so the priority will be set to “Hub”.
priorities:
- Hub
- To ensure that the “Hub” server is always the default server when players join the network, set the
force_default_server
option to true.
force_default_server: true
- Enable IP forwarding by setting the
ip_forward
option totrue
. This allows BungeeCord to forward player connections to local IP addresses.
ip_forward: true
- Save the
config.yml
file.
Firewall Configuration
To forward player connections, you will need to configure a firewall rule to allow Docker to forward incoming connections to the BungeeCord subserver. Here’s an example of how to create the firewall rule using the ufw:
- Open a terminal on your server.
- Run the following command to allow incoming connections on ports 30000 to 30010 for the IP address 172.18.0.1:
ufw allow in on pterodactyl0 to 172.18.0.1 port 30000:30010 proto tcp
The firewall rule is now set up to allow BungeeCord to forward incoming connections to subservers listening locally.
Pterodactyl Subservers Configuration
To make the Pterodactyl subservers listen on the Docker IP address 172.18.0.1 with any port from 30000 to 30010, you need to make the following changes on the Pterodactyl node allocations page:
- Log in to your Pterodactyl panel.
- Go to the “Node” page and select the appropriate node.
- Navigate to the “Allocations” tab.
- In the “Assign New Allocations” card, add the IP address
172.18.0.1
and the port range30000-30010
for each your subservers. - Save the changes.