Custom dnsmasq

For ages I've been using a provider's lame router and a separate orangepi with dnsmasq.
Now, I go a decent router and moving from orangepi to that thing. Mostly seamlessly, like, I "just copied" my nginx confs to /etc/nginx/conf.d/ and that was pretty much it.
dnsmasq is a problem as OpenWRT wants to control it and provides a bunch of options but some missing and I wonder what is the right way to approach this?

The things I am after and cannot spot in the WebUI are (dnsmasq with DNS+DHCP runs now on 192.168.10.200 and the router is 192.168.10.201, only DNS is served by dnsmasq):

  1. hostnames instead of MAC in leases (so wifi or any of usb eth dongles - does not matter, the host provides the name and receives an IP), like:
    dhcp-host=ole,192.168.10.153,1m

  2. override DNS for some servers, for example (the last line is DNS on the :
    server=/thepiratebay.net/8.8.8.8
    server=/thepiratebay.net/8.8.4.4
    server=192.168.10.201

  3. I have about 80 leases, I do not really want to cut-n-paste these and I kinda like vim better anyway :slight_smile:

I could just copy my current config over, create a service and be done with it, should I? Upgrading OpenWRT is likely to break it if I do not do it right.

  1. here, there's also /etc/ethers
  2. here
  3. same as 1, enter one through gui, then do the rest via cli, when you've seen the syntax.
1 Like

thanks! My router runs openwrt-23.05 branch git-24.264.56413-c7a3562 (too old?) so no "DNS records" (but there is "Hostnames"), cool.

oh now it turns out I cannot add leases unleeeeeess I enable active DHCP on any interface. This is annoying :-/ I was hoping I can enter all of my config and then flip the DHCP switch but I cannot.

enable DHCP for 127.0.0.1 only ?
or create a virtual interface, do the same there.

how do I do this? "lo" does not appear anywhere in the WebUI. Doing it via ssh might not produce the desired effect on the DHCP WebUI.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.