RESOLV.CONF on OpenWRT: Difference between revisions

wiki.TerraBase.info
Jump to navigation Jump to search
Created page with "===== Introduction ===== With the default install of OpenWRT, the resolv.conf file is automatically generated during boot up and place here: /tmp (Full Path: /tmp/resolv.conf...."
 
mNo edit summary
 
Line 1: Line 1:
===== Introduction =====
=====Introduction=====
The resolv.conf file is a plain text file that contains DNS Server IP Address used for Name Resolution: [[wikipedia:Resolv.conf|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/resolv.conf.auto
With the default install of OpenWRT, the resolv.conf file is automatically generated during boot up and place here: /tmp (Full Path: /tmp/resolv.conf.auto


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


* /tmp/resolv.conf.auto 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/resolv.conf.auto file will have one entry, if there are two DNS Servers defined for the WAN interface the same /tmp/resolv.conf.auto file will have two entries, if there are two WAN interfaces all of their DNS Servers will be included in the /tmp/resolve.conf.auto file, etc.)
*/tmp/resolv.conf.auto 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/resolv.conf.auto file will have one entry, if there are two DNS Servers defined for the WAN interface the same /tmp/resolv.conf.auto file will have two entries, if there are two WAN interfaces all of their DNS Servers will be included in the /tmp/resolve.conf.auto file, etc.)
* A Symbolic Link is created as follows: /tmp/resolv.conf →
*A Symbolic Link is created as follows: /tmp/resolv.conf → /tmp/resolv.conf.auto (Command Equivalent: ln -s /tmp/resolv.conf.auto /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/resolv.conf.auto through another Symbolic Link /tmp/resolv.conf
 
Various software such as DNSMASQ manipulates the settings in the resolv.conf file
 
<br />

Latest revision as of 01:45, 22 August 2021

Introduction

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/resolv.conf.auto

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

  • /tmp/resolv.conf.auto 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/resolv.conf.auto file will have one entry, if there are two DNS Servers defined for the WAN interface the same /tmp/resolv.conf.auto file will have two entries, if there are two WAN interfaces all of their DNS Servers will be included in the /tmp/resolve.conf.auto file, etc.)
  • A Symbolic Link is created as follows: /tmp/resolv.conf → /tmp/resolv.conf.auto (Command Equivalent: ln -s /tmp/resolv.conf.auto /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/resolv.conf.auto through another Symbolic Link /tmp/resolv.conf

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