Free Up Port 53 on Ubuntu so custom DNS server can use it
9
votes
3
answers
45069
views
I am implementing a custom DNS server,
but when I try using it, it clashes with port 53 being in use.
Changing resolved.config file doesn't help.
My
resolved.conf
file looks like this:
[Resolve]
DNS=127.0.0.1
#FallbackDNS=
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
My /etc/resolv.conf
file looks like this:
nameserver 127.0.0.1
nameserver 192.168.1.1
search lan1
Port 53 is still used to resolve DNS...
$ sudo lsof -i :53
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE
systemd-r 636 systemd-resolve 12u IPv4 22828
0t0 UDP 127.0.0.53:domain
systemd-r 636 systemd-resolve 13u IPv4 22829 0t0 TCP
127.0.0.53:domain (LISTEN)
When I run the custom DNS Server, I get an error,
File "/usr/lib/python3.8/socketserver.py", line 466, in
server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
I would greatly appreciate any advice.
Asked by Roman Kozulia
(93 rep)
Nov 10, 2021, 07:30 PM
Last activity: Feb 7, 2025, 10:16 AM
Last activity: Feb 7, 2025, 10:16 AM