Jump to navigation Jump to search

The resolv.conf file is a plain text file that contains DNS Server IP Address used for Name Resolution: resolv.conf - Wikipedia Unlike most Linux based systems where the resolv.conf file is manually configured, in OpenWRT it is dynamically generated.

With the default install of OpenWRT, the resolv.conf file is automatically generated during boot up and place here: /tmp (Full Path: /tmp/

And now you might be saying, "...wait a minute, resolv.conf and, is there a typo there? Nope. Here's what happens when OpenWRT boots up;

  • /tmp/ is created during bootup from the DNS Servers configured for each interface (IE, if the WAN interface has a single DNS Server defined, the /tmp/ file will have one entry, if there are two DNS Servers defined for the WAN interface the same /tmp/ file will have two entries, if there are two WAN interfaces all of their DNS Servers will be included in the /tmp/ file, etc.)
  • A Symbolic Link is created as follows: /tmp/resolv.conf → /tmp/ (Command Equivalent: ln -s /tmp/ /tmp/resolv.conf)
  • Another Symbolic Link is created as follows: /etc/resolv.conf → /tmp/resolv.conf (Command Equivalent: ln -s /tmp/resolv.conf /etc/resolv.conf)

So the result is /etc/resolv.conf is a Symbolic Link that eventually points to /tmp/ through another Symbolic Link /tmp/resolv.conf

Various software such as DNSMASQ manipulates the settings in the resolv.conf file