Something is listening on port 53
Port 53 is reserved for the Domain Name System (DNS).
In your case it is the DNS cacher dnsmasq
of the package dnsmasq-base
. This pre-installed package is a dependency of network-manager
, the network manager of your desktop environment (e.g. Unity, GNOME, …).
For this reason, don't uninstall the package dnsmasq-base
and/or disable the service. Install bind9
and all is fine
sudo apt-get install bind9
Now you should see something like this, bind9
(named
) is also running on port 53:
% sudo netstat -tulpn | grep ":53 "
tcp 0 0 192.168.2.131:53 0.0.0.0:* LISTEN 8921/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 8921/named
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 1223/dnsmasq
tcp6 0 0 :::53 :::* LISTEN 8921/named
udp 0 0 192.168.2.131:53 0.0.0.0:* 8921/named
udp 0 0 127.0.0.1:53 0.0.0.0:* 8921/named
udp 0 0 127.0.1.1:53 0.0.0.0:* 1223/dnsmasq
udp6 0 0 :::53 :::* 8921/named
Use the command
sudo netstat -tulpn
to show the ports and listening processes for udp and tcp. For DNS it's usually UDP.
Use
ps -p PID -o comm=
to show the command name for the given process id (PID).
Related videos on Youtube
fufs
Updated on September 18, 2022Comments
-
fufs over 1 year
I want to set up
bind9
, but something is listening on port 53. It's local address is ubuntu.ubuntu-do:domain. How to disable it, so it wouldn't listen anymore? I think it isdnsmasq
, but still I don't know hot to disable it. -
fufs over 8 yearseverything would be cool, except that when I type: "sudo service dnsmasq disable" it says that that service is not recognized, when i type "sudo apt-get remove dnsmasq" it says no program installed, but when I type "sudo netstat -tulpn" it says the port 53 is used by dnsmasq. Why?
-
A.B. over 8 yearsSorry, updated my answer.
-
not2savvy over 3 yearsUnfortunately, this answer does not explain how to disable dnsmasq. I'd like to disable it because I want to run dnsmasq from a docker container instead.