

So if you want to do it with some patching here is the answer.

It is because Vagrant gives IP address to eth0 interface and the default setting is via DHCP. Is there a way without editing the /etc/dhcp/dhclient-enter-hooks.d/resolvconf script? I tried editing /etc/resolvconf/interface-order and changed eth* to eth1 to no avail. 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 can remove it temporarily using resolvconf -d eth0.dhclient, but the settings keep reappearing after reboot. I want to retain the latter (10.20.30.40), while disabling settings coming from the eth0. nameserver 10.20.30.40 comes from from DHCP settings on eth1.nameserver 10.0.2.3 and search local come from from DHCP settings on eth0.# DO NOT EDIT THIS FILE BY HAND - YOUR CHANGES WILL BE OVERWRITTEN The nf looks like this: # Dynamic nf(5) file for glibc resolver(3) generated by resolvconf(8) This creates an interface eth1 with DHCP-pulled settings. I have a network defined in my Vagrantfile as follows: server.vm.network "private_network", type: "dhcp", virtualbox_intnet: true I want to permanently disable nameserver 10.0.2.3 set by resolvconf based on Vagrant's default eth0 interface. I am using ubuntu/trusty64 Vagrant box with VirtualBox.
