Dnsmasq: Port 53 Already in use

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
charma11

Dnsmasq: Port 53 Already in use

Post by charma11 »

I am using Linux Mint 19 Cinnamon 3.8.6.

I just installed Mint yesterday, and I have since been setting it up. One application that I use is called dnsmasq. I use dnsmasq to block certain websites, mostly ad networks. I noticed that dnsmasq was already installed on linux Mint, so I edited /etc/dnsmasq.conf to block the websites that I wanted to block (e.g "address=/doubleclick.net/0.0.0.0"). When I rebooted my computer, I noticed that dnsmasq was not working-- I could still connect to websites that I had blocked in my dnsmasq.conf file. After typing sudo dnsmasq into a terminal, I got the error "dnsmasq: failed to create listening socket for port 53: Address already in use" I did some research, and I found quite a few answers online, and most seemed to suggest that the program that was blocking dnsmasq was NetworkManager. I tried many different solutions that I found online, but none of them fixed the problem. I could always still connect to websites that I blocked. I would really like to get dnsmasq to work so I can block the websites. I would really appreciate it if someone could help me with this. Does anyone know how to get dnsmasq to work?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
charma11

Re: Dnsmasq: Port 53 Already in use

Post by charma11 »

I think that the process interfering with dnsmasq may actually be systemd-resolve, not NetworkManager, because after running

Code: Select all

sudo netstat -lnp | grep ":53 "
I get the output:

Code: Select all

tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      484/systemd-resolve 
udp     3840      0 127.0.0.53:53           0.0.0.0:*                           484/systemd-resolve
Locked

Return to “Networking”