How to open DNS port 53 using ufw on Ubuntu/Debian Linux

To open port 53 for DNS on Ubuntu/Debian Linux using ufw, you can use the following command:

sudo ufw allow 53/tcp
sudo ufw allow 53/udp

This will allow incoming and outgoing traffic on both TCP and UDP port 53, which is the standard port used for DNS. To check the status of your firewall rules, you can use the command:

sudo ufw status

This will show you a list of the current firewall rules and their status. To make sure that the changes you made take effect, you can reload the firewall using the command:

sudo ufw reload

Now your DNS port is open and you should be able to use DNS service on your Ubuntu/Debian Linux server.

Leave a Comment