LIVEWe’re live! Celebrate with 20% off your first monthLAUNCH20Claim discount
Skip to main content

Guides

UFW Firewall & Port Binding on VPS

Opening common server ports and troubleshooting why your server refuses to bind to the IP address.

Back to overview

UFW Firewall & Port Binding on VPS

Opening common server ports and troubleshooting why your server refuses to bind to the IP address.

Advanced6 min

1. Open Ports in UFW

If you are using a VPS, you must manually tell the firewall which ports should be open. Use 'ufw' for this.

sudo ufw allow 25565/tcp # Minecraft
sudo ufw allow 30120/tcp # FiveM TCP
sudo ufw allow 30120/udp # FiveM UDP
sudo ufw enable

2. Troubleshoot 'Address already in use' error

If your server refuses to start with an 'EADDRINUSE' or 'Cannot bind to port' error, another process is already using that port or you are trying to bind to an incorrect IP.

sudo lsof -i :25565 # Find the process ID holding the port
sudo kill -9 [PID] # Stop that specific process

3. Use 0.0.0.0 for binding

Instead of entering your VPS's specific IP address in the server configurations (e.g. server.properties or server.cfg), it's safer and easier to bind to 0.0.0.0. This makes it listen on all network interfaces.

server-ip=0.0.0.0

Still stuck?

Tell support what you already tried so we can help faster.

Get support

VylorNode Support

We are here to help

Typically online

Start a conversation

Send your question and a team member will reply as soon as possible.