Hi All,
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 1.2.3.4" >> /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 1.2.3.4" is successfully present in /tmp/resolv.conf.auto
.
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: 1.2.3.4 to /tmp/resolv.conf.auto [Status: 0]
DNS_DEBUG:NetIfd: Contents of /tmp/resolv.conf.auto
# Interface wan
nameserver 8.8.8.8
search example.org
nameserver 1.2.3.4
Checking '/tmp/resolv.conf.auto' file. My DNS Server "nameserver 1.2.3.4" is lost.
root@OpenWrt:~# cat /tmp/resolv.conf.auto
# Interface wan
nameserver 8.8.8.8
search example.org
root@OpenWrt:~#
Thanks,
PerumalPreformatted text