Skip to content

Dedicated Server: Open Ports, Configure Firewall and DDoS Protection

Open a port on your dedicated server: check the Linux or Windows firewall, request rules in the DDoS protection tab and fix common connection problems.

29 November 20268 min read1 Views0 helpful

Introduction

If a service on your dedicated server can't be reached from the internet, the cause usually sits in one of three places: the service itself isn't running correctly, the firewall of your operating system blocks the port, or the DDoS protection in front of your server filters the traffic. This guide walks you through all three in order and shows you how to fix common problems with custom ports, VPNs, websites behind Cloudflare and outgoing connections.

Info

Dedicated servers don't have a separate network firewall in the ZapX dashboard. You open ports directly in the firewall of your operating system, for example with UFW on Linux or the Windows Defender Firewall.

Port not reachable: check it step by step

Go through the steps in order and replace 25565 with your port.

  1. Check the service: On Linux, ss -tulpn | grep 25565 shows whether a program is listening on the port. On Windows, use Get-NetTCPConnection -LocalPort 25565 -State Listen in PowerShell, or Get-NetUDPEndpoint -LocalPort 25565 for UDP services. If there is no output, the service isn't running or uses a different port. If the local address is 127.0.0.1, the service is only reachable from the server itself. Change it to 0.0.0.0 or your public IP address in its configuration.
  2. Check the operating system firewall: On Linux, ufw status (UFW, Ubuntu and Debian), firewall-cmd --list-all (firewalld, AlmaLinux and Rocky Linux) or nft list ruleset and iptables -S show the active rules. To open the port, use for example ufw allow 25565/tcp, or firewall-cmd --permanent --add-port=25565/tcp followed by firewall-cmd --reload. On Windows, create an inbound rule as described in Managing Windows Defender Firewall Rules. Pick the right protocol: many games need UDP, web and database services need TCP. TCP and UDP each need their own rule.
  3. Check the Proxmox firewall: If your server runs Proxmox VE and the service runs inside a VM, the Proxmox firewall at datacenter, node or VM level can block the port as well. Also check the firewall inside the VM's guest system.
  4. Test from outside: Check the port with our Port Checker. For TCP the result is clear. An open UDP port often doesn't answer the test request, so only a "closed" result is reliable. It's best to test UDP services directly with the game or program.
  5. Check the DDoS protection: If the port still isn't reachable, look at the learned rules in the DDoS protection tab as described in the next section.
Tip

Our overview Common Ports & firewall commands shows which service uses which default port and the matching command for UFW, firewalld or iptables.

DDoS protection: learned rules and custom ports

If your dashboard shows the DDoS protection tab, the PletX DDoS protection filters incoming traffic before it reaches your server. Whether the tab is available depends on your server's location. The filter detects the protocol per port automatically as soon as real traffic arrives and creates a rule for it, for example SSH on TCP 22. Traffic that doesn't match the rule gets filtered.

Here's how to check the rules and request a missing one:

  1. Open your dedicated server and the DDoS protection tab. If your server has several IP addresses, select the affected one under IP address at the top.
  2. Check under Learned rules which service is listed for your port.
  3. If the rule is missing or shows the wrong service, click Request rule. Enter the Port, the Protocol and the Service on this port, and briefly describe what doesn't work while the filter is active. The request opens a ticket, and we let you know there as soon as the rule is active.
  4. For a test, you can switch the protection off for the selected IP address with the toggle and confirm with Disable protection. If the port works then, the filter is the cause. Switch the protection back on afterwards.
Warning

While the protection is off, the IP address isn't protected against DDoS attacks and bandwidth is limited to the port speed you booked (at least 1 Gbit/s, at most 5 Gbit/s). After a detected attack, the protection stays mandatory for 30 days. The exact date is shown in the tab.

You can't delete learned rules yourself. If the filter learned the wrong service for a port, use Request rule to ask for the correct one.

Website behind Cloudflare: error 520 or 522

The filter doesn't create rules for web ports such as TCP 80 and 443 automatically. With a very high number of simultaneous connections, which is normal for a website behind Cloudflare, some connection attempts can get lost. Visitors then see the Cloudflare errors 520 or 522 from time to time, or larger uploads fail. In that case, use Request rule to ask for one rule each for TCP 80 and TCP 443, plus the ports of your hosting panel if you use one. Switching the protection off only for Cloudflare's IP ranges isn't possible, the toggle always applies to the whole IP address.

VPN, Tailscale and WireGuard

VPN and mesh tools often use UDP ports whose traffic looks like other protocols. Tailscale on its default port UDP 41641, for example, has been detected as WireGuard, which made connections drop. If Learned rules shows a different service for your VPN port than the one you run, request the right rule via Request rule and name the service precisely, for example "Tailscale (Headscale)".

Testing your own UDP services

Always test UDP ports with a service that answers the packets, for example your game, voice server or VPN. Test packets sent to a port where nothing answers don't arrive reliably behind the filter, so such a test tells you nothing about whether your service works.

Your own VMs and additional IP addresses

If you run VMs or containers on your dedicated server, for example with Proxmox VE, keep this in mind:

  • Only use IP addresses assigned to your server for publicly reachable VMs. You'll find them in the Network tab under Additional public addresses and Failover addresses. You can book more IP addresses in the Manage plan tab.
  • Never configure IP addresses that belong to another server, not even for a test. It disrupts the server that owns the address and can get your server locked.
  • Private addresses (for example 10.0.0.0/8 or 192.168.0.0/16) for an internal network behind NAT are fine, as long as they only sit on an internal bridge and not on the network card connected to our network.

The guides IP Configuration (Ubuntu/Debian) and IP Configuration (Windows) show how to set up additional IP addresses in the operating system.

Server has no internet or stopped responding

If your server stops responding or can't reach the internet itself, the cause is usually the network configuration, a firewall rule or a VPN on the server. The Remote Management tab still gets you onto the server: click Start session and then Open Remote Management to open the console via iLO or IPMI. The iLO guide has more details.

On Linux, check the following in the console:

  1. ip a shows whether your public IP address is still set on the network card.
  2. ip route must contain a default via line with your gateway.
  3. ping -c 3 1.1.1.1 tests the connection to the internet. If that works but ping -c 3 google.com doesn't, only name resolution (DNS) is affected. Check resolvectl status or /etc/resolv.conf and add the DNS servers permanently to your network configuration, on Ubuntu for example in the Netplan file under nameservers, followed by netplan apply.
  4. iptables -S, nft list ruleset or ufw status verbose show whether a rule blocks outgoing traffic or ping, for example an OUTPUT policy set to DROP.
  5. If you set up a VPN shortly before, check whether it took over the default route, for example through AllowedIPs = 0.0.0.0/0 in WireGuard or an exit node in Tailscale.

On Windows, ipconfig /all shows the IP address, gateway and DNS servers. Settings you only changed temporarily are often gone after a reboot, so always save them permanently.

If you can't get onto the server at all, see Restore Access (Linux) or Restore Access (Windows).

Outgoing connections to one specific destination time out

If your server reaches almost every destination but not one particular website or server, the cause is rarely your server. Often the destination network filters certain IP ranges, or the return path to your server is broken. Here's how to narrow it down:

  1. Run an MTR from your server to the destination, for example mtr -rwz -T -P 443 -c 100 target.example.com (on Debian and Ubuntu, install it first with apt install mtr-tiny). On Windows, use WinMTR, see Network Analysis with WinMTR/MTR.
  2. Ask the operator of the destination whether they filter your IP address or IP range. We have no insight into their filters.
  3. Send us the MTR output together with the time of the test in a ticket, and we'll check the path with our upstream provider.

Server locked for suspected abuse

If your server attacks other systems, for example with port scans, brute-force login attempts or DDoS traffic, it can get locked. The dashboard then shows a lock notice with the reason, such as Suspected abuse or Outgoing DDoS. You can't lift this kind of lock yourself, use Contact Support instead.

Common causes are a compromised server (weak or reused password, outdated software), an open VPN or proxy that strangers send traffic through, or an unknown process inside a container. Check the running processes and your services' logs, and secure the server as described in Linux Security Tips. Tell support what you found and changed.

Conclusion

You now know how to find out step by step why a port on your dedicated server isn't reachable, how to request a matching rule in the DDoS protection tab, and what to do if your server has no internet or gets locked. For further questions or assistance, please don't hesitate to contact our support team, which is available daily to assist you! 🙂

Free tools

Related tools for servers and developers

View all

FAQ

Frequently asked questions

You open ports in the firewall of your operating system, on Linux for example with ufw allow 25565/tcp, on Windows with an inbound rule in the Windows Defender Firewall. Dedicated servers don't have a separate network firewall in the ZapX dashboard. If the port is still closed afterwards, check the learned rules in the DDoS protection tab.
Usually the service isn't running or only listens on 127.0.0.1, the rule uses the wrong protocol, a firewall inside a VM blocks it as well, or the DDoS protection learned an unsuitable rule for the port. The step-by-step check in this guide goes through all of these.
No, but you can request one. In the DDoS protection tab, click Request rule and enter the port, protocol and service. The request opens a ticket, and we let you know there as soon as the rule is active. You can't delete learned rules yourself either.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.