To open the DNS (Domain Name System) port 53 using ufw
(Uncomplicated Firewall) on Ubuntu or Debian Linux, you can follow these steps:
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
sudo ufw allow 53/tcp sudo ufw allow 53/udp
This will allow incoming DNS traffic on both TCP and UDP port 53.
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.
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.