How do I control the order of nameserver addresses in resolv.conf?

5,694

The resolvconf records have names that follow the pattern

IFACE.CONFIGURER

So to force eth1* records to come before other eth* records you need to replace

eth*

with

eth1*
eth*

After making this change, do

sudo resolvconf -u
Share:
5,694

Related videos on Youtube

CAB
Author by

CAB

Updated on September 18, 2022

Comments

  • CAB
    CAB over 1 year

    I need to re-order /etc/resolv.conf to list the nameserver provided by eth1 dhcp before the nameserver provided by eth0 dhcp on a 12.04 server (no NetworkManager).

    I edited /etc/resolveconf/interface-order and replaced its 'eth*' entry with;

    eth1
    eth0
    

    Then tried resolvconf -u, ifdown'ed and ifup'ed each interface, dpkg-reconfigure resolvconf, service networking restart and rebooted. None of this had any effect on the order of resolv.conf. What am I missing?