Hello,
I have an EdgeRouter X with OpenWrt 18.06.5.
Router WAN port is connected with static IP to my ISP gateway in DMZ and LAN ports to my LAN stuffs.
Current config:
uci show network.lan
network.lan=interface
network.lan.type='bridge'
network.lan.ifname='eth0.1'
network.lan.proto='static'
network.lan.netmask='255.255.255.0'
network.lan.ip6assign='60'
network.lan.ipaddr='10.0.0.1'
I have configured the DNS under WAN interface and everithing work fine.
Should I add also network.lan.dns='1.1.1.1 1.0.0.1'?
What is the difference having the DNS under lan section only, under wan section only or under both interfaces?
The linux systems use /etc/resolv.conf to specify nameservers and options.
In the case of OpenWrt, it is symbolic link to /tmp
root@koutsomoura:~# ls -la /etc/resolv.conf
lrwxrwxrwx 1 root root 16 Jun 27 14:18 /etc/resolv.conf -> /tmp/resolv.conf
In /tmp however there are a few resolv.* files. Do a head -n -0 /tmp/resolv.* to check them all.
In a nutshell /tmp/resolv.conf will be using 127.0.0.1 as nameserver, that means the local dnsmasq, and there is also an option for search domain. (default is lan) /tmp/resolv.conf.INTERFACE will contain the NS that you configured or were automatically acquired (from ppp or dhcp) /tmp/resolv.conf.auto contains a collection of the available NS from all the interfaces (if enabled) and is by default used by dnsmasq for resolving.