Recently in doing OpenWrt platform, DNS use is DNSMASQ, but through the board to the Internet, the PC's DNS is set to board the time, found that Baidu, etc., but the company mailbox can not open. The domain name of the company mailbox
xx-xx-notes.xxx.com.cn form, so the DNSMASQ log opened to see the next. Finally found the problem.
How to open DNSMASQ log
1. Find/etc/dnsmasq.conf
In the OpenWrt system, dnsmasq.conf is generated by the/ETC/INIT.D/DNSMASQ file, which is generated by reading the configuration under/ETC/CONFIG/DHCP and then adding some configuration of DNS to form dnsmasq.conf.
So you have to modify it in/ETC/INIT.D/DNSMASQ, instead of modifying it directly/etc/dnsmasq.conf
Add log configuration at the end of the file
Log-queries
Log-facility=/var/log/dnsmasq.log
2. Restart DNSMASQ
/ETC/INIT.D/DNSMASQ restart
3. Ping xx-xx-notes.xxx.com.cn
4. View the Var/log/dnsmasq.log file to see the results of the ping
Discover DNSMASQ possible Dns-rebind attack detected:
5. Problem solving
Baidu found that if the dnsmasq.conf add "Stop-dns-rebind" can lead to this problem, remove this option, restart the good. Remove this option is inside the/ETC/CONFIG/DHCP, modify
Option rebind_protection ' 0 '
Direct modification dnsmasq.conf will be overwritten
DNSMASQ possible Dns-rebind attack detected error