I am using ubuntu/trusty64 Vagrant box with VirtualBox. I want to permanently disable nameserver 10.0.2.3 set by resolvconf based on Vagrant's default eth0 interface.
I have a network defined in my Vagrantfile as follows:
server.vm.network "private_network", type: "dhcp", virtualbox__intnet: true
This creates an interface eth1 with DHCP-pulled settings. The resolv.conf looks like this:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 10.0.2.3
nameserver 10.20.30.40
search local
nameserver 10.0.2.3andsearch localcome from from DHCP settings oneth0nameserver 10.20.30.40comes from from DHCP settings oneth1
I want to retain the latter (10.20.30.40), while disabling settings coming from the eth0. I can remove it temporarily using resolvconf -d eth0.dhclient, but the settings keep reappearing after reboot.
I know I can override all DHCP DNS settings with a static one as described here, however I want to retain DHCP settings from eth1 interface and disable only eth0.
I tried editing /etc/resolvconf/interface-order and changed eth* to eth1 to no avail.
Is there a way without editing the /etc/dhcp/dhclient-enter-hooks.d/resolvconf script?