# Allow a port to firewall

1. we must allow our firewall to accept the connections that will happens in the 4242 port. What we will do is use:

```sh
sudo ufw allow 4242
```

<figure><img src="https://3975474142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvxQldFCzdjsw8BkClhdK%2Fuploads%2Fgit-blob-1877e4fbe5f19a5655a53344f9979c35e3f406df%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

2. Lastly we will check if everything done here is correct checking the actual state of our firewall. For that we will use:

```sh
sudo ufw status
```

<figure><img src="https://3975474142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvxQldFCzdjsw8BkClhdK%2Fuploads%2Fgit-blob-e58c020b9116fa5ed12efbe358a5046cdeb370da%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
