I needed to make some changes in my openWRT router, and reconfigure it.
IAfter doing it I have a problem: it is the DHCP server of the lan network, I have configured it as DNS server too, but it is not the gateway, the gateway is another router.
So I configured it with an ip 172.16.255.2 the DHCP server to serve IPs from IP net 172.16.0.0, net mask 255.255.0.0 and gateway 172.16.255.1 (the other router).
It is the only DHCP server in the net, the other router has no DHCP server.
But when a client gets a lease, it configures 172.16.255.2 as the gateway and not 172.16.255.1.
DNS is correctly configured as 172.16.255.2
I have checked that the lease was served by the DHC server (172.16.255.2)
Here is the configuration of the lan interface:
Obviously other setting is overriding the gateway, by I cannot find it, never happened this to me.
The DNS does not work either, it responds but do not forward DNS queries (when I use nslookup and make a local query it works, but when I try to resolve an external domain like microsoft.com it answers query refused).
This is the config, 172.16.255.2 is configured as the DNS server in DHCP, as I want to resolve first local queries for domain .home.
So in lan interface adapt oprtions I did not add any DNS.
And in DHCP and DNS config (I am using default dnsMasq as dhcp and dns server):
I cannot find what is wrong either.
Thank you for your help, I've been trying to solve it all the day.