Running an ARK server on a VPS is not only about installing the ARK Dedicated Server software and starting your game world. Your firewall also needs to allow the network traffic that ARK requires. If the necessary ports are blocked, the ARK server may be running normally while players still cannot connect or find it in the server browser.

The good news is that firewall configuration is fairly straightforward once you understand what each port does.

This guide explains how to configure the main ARK ports on a Linux VPS, how to use UFW rules, and how to keep administrative ports such as RCON restricted.

If you are setting up multiple ARK servers on one VPS, you can also refer to this ARK cluster server configuration guide to understand how separate ports are assigned to different server instances.

Why Firewall Configuration Matters for an ARK VPS

A VPS firewall controls which network connections are allowed to reach your server.

For an ARK server, some ports need to be reachable by players and Steam server-query services. If those ports are blocked, the ARK server may be running normally while players still cannot connect.

A firewall can also help protect services that should not be publicly accessible.

For example, your ARK VPS may have:

  • ARK game traffic
  • Steam query traffic
  • RCON administration
  • SSH administration

These services do not all need the same level of public access.

The basic approach is simple: allow the ports required for gameplay and server discovery, while restricting administrative services as much as possible.

ARK Ports You Need to Know

An ARK: Survival Evolved dedicated server commonly uses several network ports.

The exact configuration depends on your setup, but the main ports include:

  • Game port — used for player connections
  • Peer port — associated with the game port
  • Steam query port — used for Steam server-browser information
  • RCON port — optional remote administration

For example, a server using game port 7777 can use:

Game Port: 7777/UDP
Peer Port: 7778/UDP
Query Port: 27015/UDP
RCON Port: 27020/TCP

The peer port is normally the game port plus one, so a game port of 7777 uses peer port 7778.

If you are running another ARK instance on the same VPS, use different ports. For example:

Server 1:
7777/UDP
7778/UDP
27015/UDP

Server 2:
7779/UDP
7780/UDP
27016/UDP

Multiple ARK server instances can run on the same host when each instance has its own port assignments. ARK Wiki

Keeping the port assignments separate prevents multiple ARK instances from competing for the same network ports.

Important Note About Steam Query Ports

The Steam query port is important when players need to find the server through Steam's server browser.

For example:

Server 1:
QueryPort=27015

Server 2:
QueryPort=27016

Query ports such as 27015, 27016, 27017, and similar values can be used for multiple server instances.

However, there is an important limitation to remember: when the query port is above 27019, the Steam server browser may not find the server automatically. In that situation, the query port needs to be provided explicitly when adding the server by IP and query port. The ARK dedicated-server documentation specifically notes this limitation for query ports above 27020; its server-browser guidance also recommends explicitly specifying the query port when it is above 27019. ARK Wiki

For that reason, if you are running several ARK instances, keeping query ports within the standard range can make server discovery simpler.

Check Whether UFW Is Enabled

Ubuntu and Debian-based VPS environments commonly use UFW as a simple firewall management tool.

Before changing anything, check its current status:

sudo ufw status

You may see a result showing whether UFW is active and which rules are currently configured.

If UFW is inactive, review your existing firewall setup before enabling it. You should make sure you will not lock yourself out of SSH access.

Allow SSH Before Enabling UFW

If you are connected to your VPS through SSH, make sure SSH access is allowed before enabling the firewall.

For the standard SSH port:

sudo ufw allow 22/tcp

Then check the rule:

sudo ufw status

If your SSH service uses a different port, use that port instead of 22.

This step is important because enabling a firewall without allowing your current administration method can disconnect you from the VPS.

Open the ARK Game and Peer Ports

For a server using the standard example configuration, allow the game and peer ports:

sudo ufw allow 7777/udp
sudo ufw allow 7778/udp

For a second server instance:

sudo ufw allow 7779/udp
sudo ufw allow 7780/udp

These rules allow the UDP traffic associated with the ARK server instances.

If you use different game ports, adjust the firewall rules to match your actual server configuration.

Open the Steam Query Port

The Steam query port is used for server information and Steam server-browser discovery.

For the first server in our example:

sudo ufw allow 27015/udp

For the second server:

sudo ufw allow 27016/udp

Make sure the query port in your ARK startup configuration matches the port allowed by the firewall.

For example:

Server 1:
QueryPort=27015

Server 2:
QueryPort=27016

A mismatch between the startup configuration and firewall rules can cause server discovery or connection-related problems.

If you use a query port above the normal Steam browser range, remember that players may need to add the server manually using its IP address and query port. ARK Wiki

Configure RCON Carefully

RCON is optional. It provides remote administration access to the ARK server.

Because RCON gives administrative control, you should avoid exposing it unnecessarily to the public internet.

Instead of allowing the RCON port from everywhere, restrict it to your own administration IP when possible.

For example:

sudo ufw allow from YOUR_ADMIN_IP to any port 27020 proto tcp

If your second ARK server uses another RCON port:

sudo ufw allow from YOUR_ADMIN_IP to any port 27021 proto tcp

Replace YOUR_ADMIN_IP with the public IP address you use for administration.

Do not use a broad rule such as:

sudo ufw allow 27020/tcp

unless you specifically understand the security implications and have a reason to expose RCON publicly.

Check Your Complete Firewall Rules

After adding the required rules, check the configuration:

sudo ufw status numbered

You should see your SSH, ARK game, peer, query, and any restricted RCON rules.

For the example two-server setup, your firewall should contain rules covering:

SSH:
22/TCP

Server 1:
7777/UDP
7778/UDP
27015/UDP

Server 2:
7779/UDP
7780/UDP
27016/UDP

RCON:
27020/TCP — restricted to admin IP
27021/TCP — restricted to admin IP

Only include RCON rules if you actually use RCON.

What If Players Still Cannot Connect?

Opening the firewall ports does not guarantee that players can connect.

If your ARK server still shows a connection timeout, check the complete network path.

Start with these questions:

  1. Is the ARK Server software running?
  2. Is the server listening on the expected ports?
  3. Are the UFW rules correct?
  4. Is the VPS provider's firewall allowing the same traffic?
  5. Is the server using the correct public IP?
  6. Are the game and query ports configured correctly?
  7. Are you using the correct map and server configuration?

You can check listening UDP ports with:

sudo ss -ulpn

You can then compare the ports shown by the command with your ARK configuration.

Check Your VPS Provider Firewall

Many VPS providers have a second network-level firewall, security group, or cloud firewall.

This means you can have a correct UFW configuration and still have blocked traffic at the provider level.

For example:

Player
   ↓
Internet
   ↓
VPS Provider Firewall
   ↓
UFW
   ↓
ARK Server Software
   ↓
ARK World

All relevant layers need to allow the required traffic.

If UFW allows 7777/UDP but your provider firewall blocks it, players will still be unable to connect.

Firewall Configuration for Two ARK Servers

If you are running The Island and Ragnarok on the same VPS, you can organize the ports like this:

The Island
Game:   7777/UDP
Peer:   7778/UDP
Query:  27015/UDP
RCON:   27020/TCP

Ragnarok
Game:   7779/UDP
Peer:   7780/UDP
Query:  27016/UDP
RCON:   27021/TCP

Then configure UFW accordingly:

sudo ufw allow 7777/udp
sudo ufw allow 7778/udp
sudo ufw allow 27015/udp

sudo ufw allow 7779/udp
sudo ufw allow 7780/udp
sudo ufw allow 27016/udp

For RCON, use restricted rules:

sudo ufw allow from YOUR_ADMIN_IP to any port 27020 proto tcp
sudo ufw allow from YOUR_ADMIN_IP to any port 27021 proto tcp

This keeps the game-related ports available while limiting remote administration access.

Avoid Opening Unnecessary Ports

A common firewall mistake is opening a large range of ports simply because the server might need them later.

That makes troubleshooting harder and increases the number of publicly accessible services.

Instead, identify the ports your current ARK configuration actually uses.

For example, if your server does not use RCON, there is no reason to open its RCON port.

Similarly, if you only have one ARK instance, you do not need to open the ports assigned to a second instance.

Test After Changing Firewall Rules

After making firewall changes, check the final rules:

sudo ufw status numbered

Then verify that the ARK server is running:

ps aux | grep ShooterGameServer

You can also check the expected ports:

sudo ss -ulpn | grep -E '7777|7778|27015'

For a second server:

sudo ss -ulpn | grep -E '7779|7780|27016'

If you use RCON, check its TCP ports separately:

sudo ss -tlnp | grep -E '27020|27021'

These checks help you determine whether the issue is with the firewall or with the ARK server itself.

Common Firewall Problems on an ARK VPS

ARK Server Is Running but Players Cannot Connect

Check the game and peer ports first.

Then check UFW and your VPS provider's firewall.

Server Does Not Appear in the Browser

Check the Steam query port and make sure it matches the QueryPort value in your startup configuration.

Also check whether the query port is reachable through your VPS provider firewall.

If you are using a query port above the standard Steam browser range, try adding the server manually using its IP address and query port. ARK Wiki

One ARK Instance Works but the Second Does Not

Compare the port assignments for both instances.

The second server needs its own game, peer, query, and optional RCON ports.

RCON Cannot Connect

Check that the RCON port is open to your administration IP and that the ARK server is configured to use the same RCON port.

SSH Connection Stops Working

If SSH stops working after a firewall change, check whether the SSH port was allowed before enabling or reloading UFW.

This is why firewall changes should be made carefully while you have a reliable administration connection.

Final Thoughts

Firewall configuration is an important part of running an ARK server on a VPS.

The goal is to allow the traffic ARK actually needs without opening unnecessary services to the internet.

For a typical setup, pay attention to the game port, associated peer port, Steam query port, and optional RCON port.

If you run multiple ARK instances on the same VPS, assign separate ports to each server and keep the configuration documented.

Also remember that UFW is only one possible firewall layer. Your VPS provider may have an additional firewall or security group that needs to allow the same traffic.

With the ports configured correctly and unnecessary administrative access restricted, you can make your ARK VPS easier to manage while keeping its network exposure under control.

Frequently Asked Questions

Which ports need to be open for an ARK server?

The required ports depend on your configuration, but an ARK server commonly uses a UDP game port, its associated peer port, and a UDP Steam query port. RCON uses a separate TCP port when enabled. ARK Wiki

What is the ARK game port?

The game port is the main UDP port used for player connections to the ARK server. For example, a server may use 7777/UDP.

What is the ARK peer port?

The peer port is normally the game port plus one. For example, game port 7777 uses peer port 7778. ARK Wiki

Do I need to open the RCON port?

No. RCON is optional. If you do not use RCON, you do not need to open an RCON port.

Why can players not connect even though UFW allows the ports?

Check your ARK server configuration, listening ports, VPS provider firewall, public IP address, and network configuration. A provider-level firewall can still block traffic even when UFW is configured correctly.

Can I run multiple ARK servers on the same VPS?

Yes. Multiple ARK instances can run on one VPS when sufficient resources are available. Each instance should use separate game, peer, query, and optional RCON ports. The ARK dedicated-server documentation provides separate port examples for multiple instances.