mirror of
https://github.com/pterodactyl/documentation.git
synced 2025-12-10 00:09:39 -06:00
Server network cleanup
This commit is contained in:
parent
cb0c3fe6ba
commit
3ba47a1ab4
@ -1,37 +1,42 @@
|
||||
# Server Networks
|
||||
This guide was written for Bungeecord, but should work fine for Waterfall and Hexacord servers.
|
||||
|
||||
[[toc]]
|
||||
|
||||
:::warning
|
||||
This guide was written with BungeeCord in mind, but should work for Waterfall and Hexacord as well.
|
||||
For the setup described below, it is necessary that all servers are on the same node.
|
||||
:::
|
||||
|
||||
## Setting up a BungeeCord network
|
||||
## Setting up the Network
|
||||
The ideal setup for this involves a separated internal network with only one access point — the BungeeCord server —
|
||||
which is an easy configuration with Pterodactyl. In order to create a Bungeecord network you'll first need to add an
|
||||
allocation to your Node that makes your Bungeecord server publicly accessible. This allocation should be for your
|
||||
public IP address and the default port you wish to use — generally `25565`.
|
||||
|
||||
The ideal setup with BungeeCord is a seperated internal network with only one access point which is the BungeeCord server. Pterodactyl provides this with Docker.
|
||||
In order to create a BungeeCord network you'll have to add an allocation with which the BungeeCord server should be reachable. Add an allocation with the IP address of the node and the desired port (e.g. 25565, the default Minecraft port) to your node first.
|
||||
Then create a new BungeeCord server and use the allocation you just created.
|
||||
## Adding Additional Servers
|
||||
All other servers that are a part of the network should be created on local interfaces — meaning they are not publicly
|
||||
accessible. Create new allocations on the localhost IP address `127.0.0.1` with some ports for the servers to use.
|
||||
You can also enter a port range, e.g. `30000-30010` which will get you 11 ports.
|
||||
|
||||
### Adding servers to the BungeeCord network
|
||||
Now create new servers and be sure to use your internal allocations — `127.0.0.1` — for each of them. To add the
|
||||
servers to your network you'll use `172.18.0.1:<port>` — or `127.0.0.1` which will automatically be resolved to your
|
||||
Docker network interface IP — as the IP address in your configuration file.
|
||||
|
||||
All the other servers that should be part of the BungeeCord network don't require external ports. Create new allocations on the localhost IP address `127.0.0.1` with some ports for the servers to use. You can also enter a port range, e.g. `30000-30010` which will get you 11 ports.
|
||||
Now create new servers and be sure to use `127.0.0.1` allocations for each of them. To add the servers to your BungeeCord network, use `172.18.0.1:<port of the internal server>` (not 127.0.0.1) as the IP addresses of the servers to add in your configuration file.
|
||||
## In Conclusion
|
||||
* Only the proxy server (Bungeecord/Hexacord/Waterfall) should be attached to your publically accessible IP address.
|
||||
* You should _not_ make any modifications to IPTables.
|
||||
* All of the servers behind the proxy are safe from direct _external_ connections, assuming you bind them to `127.0.0.1`.
|
||||
|
||||
## Notes
|
||||
## UFW Firewall
|
||||
If you are using a `ufw` firewall, it might be necessary to allow access to specific host ports. The following command
|
||||
allows incoming requests to `172.18.0.1`, which is the IP of the actual host server within the docker network. Replace
|
||||
`<LOCALHOST_PORT>` with any port you want to be accessible. In this case use the port you assigned to the minecraft
|
||||
server you want to add.
|
||||
|
||||
* **Only** the proxy (Waterfall / Hexagon / Bungee) has to be bound to an external IP.
|
||||
* **No modifications to iptables should be done**
|
||||
* all servers behind the proxy are safe.
|
||||
|
||||
### UFW Firewall
|
||||
|
||||
If you are using the ufw firewall, it might be necessary to allow access to specific host ports. The following command allows incoming requests to `172.18.0.1`, which is the IP of the actual host server within the docker network. Replace `<LOCALHOST_PORT>` with any port you want to be accessible. In this case use the port you assigned to the minecraft server you want to add.
|
||||
:::warning
|
||||
The ports you open with this command will be accessible by any server _on the same node_.
|
||||
:::
|
||||
|
||||
```
|
||||
ufw allow in on pterodactyl0 to 172.18.0.1 port <LOCALHOST_PORT> proto tcp
|
||||
```
|
||||
|
||||
:::warning
|
||||
The ports you open with this command will be accessible by any server on the same node.
|
||||
:::
|
||||
Loading…
x
Reference in New Issue
Block a user