> For the complete documentation index, see [llms.txt](https://surftest.gitbook.io/axelar-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://surftest.gitbook.io/axelar-wiki/english/server-settings/opening-the-ports.md).

# Opening the Ports

{% hint style="info" %}
Ports must be open for Axelar to work: 1317, 26656-26658 и 26660.
{% endhint %}

You can use the site to check if ports are open: <https://www.yougetsignal.com/tools/open-ports/> (enter the IP address - you can see the address here <https://api.ipify.org/> and ports in turn 1317, 26656-26658, 26660 all ports with the same IP address)

Or you can find out open ports on the server by entering the command:

```
ss -tulpn
```

{% hint style="info" %}
If your VPS server has a built-in firewall, then you need to open ports 1317, 26656-26658 and 26660.
{% endhint %}

If there is no built-in firewall, open the ports as described below.

1\) UFW (firewall configuration tool) always installed on Ubuntu by default (if not, install: `sudo apt install ufw -y`).  Checking the status:

```
sudo ufw status
```

2.1) If in response we receive `Status: active` - **this means the firewall is enabled.** We open the ports necessary for Axelar, and prohibit incoming traffic (prohibition of listening to private networks):

```
sudo ufw allow ssh
sudo ufw allow 22
sudo ufw allow 1317
sudo ufw allow 26656:26658/udp
sudo ufw allow 26660

ufw deny out from any to 10.0.0.0/8
ufw deny out from any to 172.16.0.0/12
ufw deny out from any to 192.168.0.0/16
ufw deny out from any to 169.254.0.0/16
```

If you want to see the rules that are set:

```
sudo ufw status verbose
```

2.2) If the response to the command above is `Status: inactive` , **means the firewall is disabled**, there is no protection.

{% hint style="warning" %}
You will most likely have the same answer.
{% endhint %}

Enter the same as above:

```
sudo ufw allow 22
sudo ufw allow 1317
sudo ufw allow 26656:26658/udp
sudo ufw allow 26660

ufw deny out from any to 10.0.0.0/8
ufw deny out from any to 172.16.0.0/12
ufw deny out from any to 192.168.0.0/16
ufw deny out from any to 169.254.0.0/16
```

Checking:

```
sudo ufw enable
sudo ufw status
ss -tulpn
```

If you want to see the rules that are set:

```
sudo ufw status verbose
```

More information about setting up UFW can be found in the [DO's tutorial](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-20-04) and  [here](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-18-04).

{% hint style="info" %}
Also you can do it differently (with the firewall turned off):

`sudo iptables -I INPUT -p tcp --dport 1317 -j ACCEPT`

`sudo iptables -I INPUT -p tcp --dport 26656:26658 -j ACCEPT`

`sudo iptables -I INPUT -p tcp --dport 26660 -j ACCEPT`

`sudo apt-get -y install iptables-persistent`

`sudo netfilter-persistent save`
{% endhint %}
