What does dnsmasq do?

I have a question as to what is DNSmasq. Is this what usually helps do logging for DNS servers such as OpenDNS? If so, are there any consequences to removing this, or can I just configure it to remove OpenDNS?
Edit: I would prefer to do LuCI GUI, but if this is not possible, may I please have some steps on how to do this please through SSH? Much appreciated
Edit 2:Edit: I just want to say, that to put into context of what is going on, is that recently, the reason for this is, is because of the software on my router called dnsmasq and I barely have any SSH or have any idea as to how do I configure OpenDNS out of dnsmasq. So if possible, I would like a step-by-step process on how to do it, if through SSH or through LuCI. Thanks!

dnsmasq is a DNS Resolver and DHCP server, commonly used in embedded devices; and as a DHCP client/DNS Resolver on PCs.

Logging DNS servers???

The premise of this question is not clear. OpenDNS is just one company that runs DNS servers for public usage...what does logging at OpenDNS have to do with the router?

Sure you can, as long as you:

  1. statically address all clients in your network; or
  2. provide another DHCP and DNS server

Since you configured it, I don't see why you wouldn't be as able to "unconfigure" it.

I have gave all my clients a static IP, but is my ISP's DNS ok to use?
Edit: I forgot to mention, if I get a new device do I have to give it, its own static IP?

It should be used by default anyways, unless you changed it.

Yes, if you intend to remove the DHCP Server (i.e. dnsmasq).

Ok thank you

1 Like

By default your router is the DNS server for the LAN (because the DHCP will advertise it as so), so dnsmasq initially handles any DNS request from a LAN machine or the router itself. Dnsmasq will forward (or in DNS terms, recurse) requests for a name it does not know to the DNS server configured on the WAN. Again in the default setup that will be the one advertised by the ISP through DHCP or pppoe on the WAN link, and it is usually an ISP owned server.


Is there any important properties about a DHCP server I should keep or will the router work fine anyways?

Alright now I understand

1 Like

Shouldn't a resolver be recursive? Dnsmasq isn't recursive. It depends on other recursive DNS servers that it can forward requests to.

1 Like


  • Resolver merely means it is the service obtaining/providing DNS replies/answers.
  • Recursion is the process of looking thru the Global DNS (hierarchically starting with ROOT) to derive at your answer.

As you correctly note, dnsmasq resolves by asking another DNS server. The latter (recursion) is only performed by a resolver using Root Hints to give replies via obtaning Authoritative Answers in hierarchy, starting from ROOT (or caches of the same).

(Edited to better clarify what a "resolver" does.)

Are there any important properties about a DHCP server I should keep or will the router work fine anyways?

I'll be honest, I've never had anyone want to remove a DHCP Server and only statically address their network (at least not in a non-secure setting). I don't know your use case, or why you desire to remove it.

To answer your direct question: It will continue work, minus all the functionality provided by dnsmasq (which is a lot) - obviously.

1 Like

Ok thank you

1 Like

The terms "DNS cache" or "querier" could be better used here i suppose, if semantics of the term was your concern.

I have one more question as if you don't mind to tell me what are to commands to "unconfigure" OpenDNS from my router, because this is the main thing I'm trying to do, if removing dnsmasq will be pretty important to keep.

I'll be happy to tell you, as soon as you explain how you managed to put them there. You'd simply undo that process you used to add them in the first place.

Perhaps, you should inform the users reading here - that you have another ONGOING thread on how to block OpenDNS IPs. It may give context to whatever you're referring to.

Well, my SSH skills suck, so I got someone to do it for me, but I have a copy of the commands so I'll try to do it.

Got it

1 Like

:open_mouth: Your other thread shows that you're controlling the web GUI???

(See, this was the "providing context" I was mentioning.)

So, why do you now note SSH is a setback then?

My bad on my part, I saw the person who was configuring the dnsmasq using SSH and I was checking other places to see how to "reconfigure it" it, and all I got were SSH commands, nothing to do with a web GUI.

OK...that seems random and not good. Seems you may have entered commands - not knowing what they actually do. Since we don't know the commands...can't tell you exactly where to locate them in the web GUI.

You could get download a backup of the config, and browse the files contained therein.

  • You will find DNS settings in /etc/config/network under the Interfaces
  • DHCP settings are under '/etc/config/dhcp'

Then on the web GUI:

Once you ID whatever OpenDNS setting (or whatever) bothers you, ask in the forum.

Or you can reset to defaults.