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

https://‮al.www‬utturi.com
How to open DNS port 53 using ufw on Ubuntu/Debian Linux

To open the DNS (Domain Name System) port 53 using ufw (Uncomplicated Firewall) on Ubuntu or Debian Linux, you can follow these steps:

  1. Check the status of the ufw firewall to ensure it is enabled and running. You can use the following command to check the status:
sudo ufw status

If the firewall is not enabled, you can enable it using the following command:

sudo ufw enable
  1. Allow incoming DNS traffic on port 53. You can use the following command to allow incoming DNS traffic on port 53:
sudo ufw allow 53/tcp
sudo ufw allow 53/udp

This will allow incoming DNS traffic on both TCP and UDP port 53.

  1. Check the ufw rules to ensure that the changes have been applied. You can use the following command to display the ufw rules:
sudo ufw show added

This will display a list of the rules that have been added to the firewall. You should see the rules allowing incoming DNS traffic on port 53 listed.

  1. If you want to make the changes persistent across reboots, you can use the following command to save the ufw rules:
sudo ufw disable
sudo ufw enable

This will disable and then re-enable the ufw firewall, which will save the current rules to the configuration file.

For more information about using ufw to manage the firewall on Ubuntu or Debian Linux, you can refer to the ufw man page or search online for tutorials and examples.

Created Time:2017-10-28 21:39:05  Author:lautturi