I would like to add a custom DNS Server IP which will resolve custom FQDN addresses.
So, ISP provided DNS server will resolve common FQDN addresses and My custom DNS server will resolve specific/custom locally provided FQDN addresses.
For this, I have added this line
echo "nameserver 18.104.22.168" >> /tmp/resolv.conf.auto at end to function
setup_interface() in script
/lib/netifd/dhcp.script. I have outputted '/tmp/resolv.conf.auto' in dhcp.script and verified "nameserver 22.214.171.124" is successfully present in
But If I view
/tmp/resolv.confi.auto file from console, My DNS server is not present. Anyone can help me findout what is happening here??
Steps To Simulate :-
Empty '/tmp/dns_log.txt' file. NetIfd script output will be stored in '/tmp/dns_log.txt'.
root@OpenWrt:~# echo "" > /tmp/dns_log.txt
Empty '/tmp/resolv.conf.auto' file.
root@OpenWrt:~# echo "" > /tmp/resolv.conf.auto
To obtain new DNS address.
root@OpenWrt:~# /etc/init.d/network restart
View NetIfd script output.
root@OpenWrt:~# cat /tmp/dns_log.txt DNS_DEBUG:NetIfd: Append Custom DNS Server: 126.96.36.199 to /tmp/resolv.conf.auto [Status: 0] DNS_DEBUG:NetIfd: Contents of /tmp/resolv.conf.auto # Interface wan nameserver 188.8.131.52 search example.org nameserver 184.108.40.206
Checking '/tmp/resolv.conf.auto' file. My DNS Server "nameserver 220.127.116.11" is lost.
root@OpenWrt:~# cat /tmp/resolv.conf.auto # Interface wan nameserver 18.104.22.168 search example.org root@OpenWrt:~#