Skip to content
  • Tails developers's avatar
    Prevent dhclient from sending the hostname over the network (Closes: #7688). · 97790a2a
    Tails developers authored
    First, we have to use the "keyfile" NetworkManager plugin only; that is, we
    disable the "ifupdown" one:
    
      * it's needed, because the only the "keyfile" plugin supports setting
        dhcp-send-hostname to false, while the "ifupdown" plugin retrieves the
        hostname to send from /etc/hostname;
      * it's OK, because we actually don't use the functionality provided by the
        "ifupdown" plugin (that is, reading from /etc/network/interfaces -- that
        only configures the loopback connection in Tails, which is itself ignored by
        NetworkManager anyway).
    
    Second, we configure the NetworkManager "keyfile" plugin to *not* send the
    hostname over DHCP by default. Likely this can be overridden on
    a per-connection basis.
    
    Third, we tell dhclient itself not to send the hostname. This is needed because
    NetworkManager runs dhclient with the `-cf /var/run/nm-dhclient-eth0.conf`
    option, and generates that file by concatenating `/etc/dhcp/dhclient.conf`
    with its own settings.
    97790a2a