Disabling dnsmasq DNS

Questions and mods regarding system management may go here
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:

https://account.synology.com/support/su ... p?lang=enu

2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
I'm New!
I'm New!
Posts: 2
Joined: Fri May 19, 2017 6:12 pm

Disabling dnsmasq DNS

Unread post by Rsiesta » Fri May 19, 2017 6:56 pm

I have found a way to disable the DNS part of dnsmasq that Synology uses for their dhcp server,
this allows me to run dnsmasq for dns only in a docker container. I don't know the persistence
over upgrades or what this might break so asking for comments.

The command to disable DNS in dnsmasq is to add this to the config file.

Code: Select all

port 0
This stops the Synology instant of dnsmasq they use for the DHCP server from binding to ports 53,
so something else can use them.

The dnsmasq config files are in /etc/dhcpd/, you can't modify any of these as the system overwrites
them. Through my searching I found if you create the file dhcpd-vendor.conf in that directory, the
Synology process reads it and adds those lines to their /etc/dhcpd/dhcpd.conf file when you
restart the dhcp server. Put your port 0 command in the new vendor file and then ports 53
will be available for other systems to use. Interestingly when you install the DNS package on the
nas it puts the same command in the config file. This persists over a reboot.

Any comments on this or what problems it may cause? There some other hoops you have to run
through to allow you to point the NAS dns at this docker container, but it seems to respond fine
from other machines.


Post Reply

Return to “System Managment Mods”