0

I'm searching for original configuration file that is the source for generating /run/resolvconf/interface/eth0.dhclient file.

That file contain DNS server names and the domain name for my machine. I'm able to change them but the change are not persistent (other config files are updated by using resolvconf -u). However, the older values are restored after a restart of the server.

Network Manager is not installed on the server that is Ubuntu 14.04 LTS.

After few hours more and more investigation, I got to conclusion that the domain name is set through our provider DHCP server. I searched a way to bypass it for the domain name without any success by:

  1. adding dns-domain-name in iface configuration for eth0 in eth0.cfg file:

    auto eth0 iface eth0 inet dhcp dns-domain-name projet-okinawa.org
    
  2. adding send domain-name and uncommenting supersede for the same domain-name in dhclient.conf
  3. setting the fully qualified name in /etc/hosts for ip 127.0.0.1

I got any error but never the correct fqdn for the server. I got either the provider dhcp one, or this error:

hostname: Name or service not known
3
  • Do read manpages.ubuntu.com/manpages/precise/en/man8/resolvconf.8.html it will explain a lot ;-) " Normally resolvconf is run only by hook scripts attached to network interface configurers such as pppd(8) (for ppp interfaces), to DHCP clients such as dhclient(8), to ifup(8) and ifdown, and to DNS caches such as dnsmasq(8) (for the loopback interface). These hook scripts furnish resolvconf with information about nameservers. "
    – Rinzwind
    Mar 18, 2016 at 12:50
  • 1
    Thank you but already read carefully this documentation and I didn't found anything in these scripts that let me understand from where the domain name was set ... I got the eth0.dhclient from this deep exploration into all this stuff (came from /etc/hosts ... the many resolv.conf, etc ...). Sure I missed something ... Mar 18, 2016 at 13:41
  • For sure the domain name is set through the DHCP. My setting is : auto eth0 iface eth0 inet dhcp. I tried pre-domain and pre-domain-name to force my own domain name withou success. I tried also to define it in the dhclient.conf also without success. Some changes causes the system to fail on restart and a reinitialization was necessary. I would like to avoid to use fix ip address and prefer to force only our own domain name but it seem to me that fix ip is unfortunately the only way at the moment. Any comment or recommandation about ? Mar 21, 2016 at 6:41

1 Answer 1

0

/etc/dhcp/dhclient-enter-hooks.d/resolvconf

usually writes /run/resolvconf/interface/eth0.dhclient when the DHCP client handles IP address updates.

This may also be handy:

14.04 default (minified) /etc/dhcp/dhclient.conf

option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers,
    domain-name, domain-name-servers, domain-search, host-name,
    dhcp6.name-servers, dhcp6.domain-search,
    netbios-name-servers, netbios-scope, interface-mtu,
    rfc3442-classless-static-routes, ntp-servers,
    dhcp6.fqdn, dhcp6.sntp-servers;

Plus, man dhclient.conf man dhcp-options man dhcp-eval

I would advise against hacking resolvconf or dhclient.conf, and set everything needed as a dhclient.conf include script using a directive like so

script "/etc/dhcp/dhclient.conf.d/this-is-a-foo-corp-or-my-network-managed-system";

Ubuntu doesn't handle every single, enterprisey edge-case (but does get most common ones), so a minor change could be needed in rare situations.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .