Dnsmasq: Port 53 Already in use

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
charma11
Level 1
Level 1
Posts: 4
Joined: Tue Jul 03, 2018 12:54 pm

Dnsmasq: Port 53 Already in use

Post by charma11 » Tue Jul 03, 2018 1:30 pm

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?

charma11
Level 1
Level 1
Posts: 4
Joined: Tue Jul 03, 2018 12:54 pm

Re: Dnsmasq: Port 53 Already in use

Post by charma11 » Tue Jul 03, 2018 1:59 pm

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

Post Reply

Return to “Other networking topics”