Local DNS server not possible with TPlink router (C80)
Hello,
Associated to the router, I have a WLAN area and a small ethernet based network (with a switch) connected to the router through an ASUS repeater in client mode (called media bridge by ASUS), as it has better throughput than CPL. So in a way, everything should be WLAN. I have set up dnsmasq on the client mode/ethernet based network on a raspberry pi to resolve local names and forward to real DNS servers if this is not local. I have configured C80 dhcp server with local+my ISP DNS servers, that is 192.168.2.xxx as primary and ISP as secondary. It works well, every connecting device, windows or linux, gets the DNS servers right
But it only works partially. The pi hosting the DNS server works OK to resolve names. Another device connected to the switch works OK, request goes to the pi. Other devices connected directly to the WLAN or ethernet ports of the router do not work. I have used tcpdump and I clearly see the request to 192.168.2.xxx local DNS server and an answer mentioning local name was not found (therefore it resolves something like myrequest.net). But this request to 192.168.2.xxx never really reaches the local DNS. Therefore, it looks as if the request (when not on the switch) goes inside the router, which redirects it outside, gets an answer and forwards it back to the device. Why is it not letting the DNS request go to the switch network ? Any ping or ssh/rsync/samba/dlna request to the raspberry pi works well.
Of course, I could fill the etc/hosts file but local DNS server looked much smarter. Is it expected behaviour, that is router always route DNS requests to the outside rather to local devices ? Do I need another type of router ?
Regards