OpenWrt Forum Archive

Topic: dnsmasq --address

The content of this topic has been archived on 30 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi, I am willing dnsmasq to resolv any host in a given domain to an specific LAN address. OpenWRT's dnsmasq is the only dns server on ny LAN.

I've read through dnsmasq documentation and confirmed that this can be done with the --address option. Therefore I added 'address=/mydomain.org/mydomain/192.168.1.X' to /etc/dnsmasq.conf file on my OpenWRT but it keeps on adding ths address option as a server option under UCI's dnsmasq as 'list server '/mydomain.org/mydomain/192.168.1.x'.

What I am doing wrong? How can I acomplish this?

Thanks a lot!

I would suggest putting it directly into /etc/config/dhcp like e.g.;

list address    '/mycompany.local/1.2.3.4'
list address    '/mydomain.org/mydomain/192.168.1.5'

But I've just tested putting it in /etc/dnsmasq.conf and it did work. Are you using this exact format?;

address=/testdomain.org/mydomain/192.168.1.6

You can check the current configuration by;

cat /tmp/etc/dnsmasq.conf | grep address
cat /etc/dnsmasq.conf | grep address

OK, working with uci solved the configuration issue (modifying dnsmasq.conf does NOT work for 'address='), I also had problems whit a DHCP lease but now is finally working!

Thanks gleten!

The discussion might have continued from here.