From 4b007f8cccbc8f8ea02e60764fc6e9e1155f10d8 Mon Sep 17 00:00:00 2001 From: Tails developers Date: Sun, 10 Aug 2014 14:03:37 +0000 Subject: [PATCH] Override the hostname provided by the DHCP server (Closes: #7769). --- config/chroot_local-patches/dhcp-dont-send-hostname.diff | 3 ++- wiki/src/contribute/design.mdwn | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config/chroot_local-patches/dhcp-dont-send-hostname.diff b/config/chroot_local-patches/dhcp-dont-send-hostname.diff index 151c6ce26..89eac568a 100644 --- a/config/chroot_local-patches/dhcp-dont-send-hostname.diff +++ b/config/chroot_local-patches/dhcp-dont-send-hostname.diff @@ -1,12 +1,13 @@ diff -Naur orig/etc/dhcp/dhclient.conf new/etc/dhcp/dhclient.conf --- orig/etc/dhcp/dhclient.conf 2014-07-31 22:31:11.363605131 +0200 +++ new/etc/dhcp/dhclient.conf 2014-07-31 22:31:43.535349519 +0200 -@@ -14,7 +14,7 @@ +@@ -14,7 +14,8 @@ option rfc3442-classless-static-routes code 121 = array of unsigned integer 8; #send host-name "andare.fugue.com"; -send host-name = gethostname(); +#send host-name = gethostname(); ++supersede host-name "amnesia"; #send dhcp-client-identifier 1:0:a0:24:ab:fb:9c; #send dhcp-lease-time 3600; #supersede domain-name "fugue.com home.vix.com"; diff --git a/wiki/src/contribute/design.mdwn b/wiki/src/contribute/design.mdwn index c23d9dfae..527eb7007 100644 --- a/wiki/src/contribute/design.mdwn +++ b/wiki/src/contribute/design.mdwn @@ -1179,6 +1179,11 @@ needed because on Wheezy, 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. +Fourth, dhclient is told to override any hostname provided by the DHCP +server with `amnesia`. This is meant to prevent dhclient hooks, +NetworkManager and others from setting the hostname to a value +controlled by the DHCP server. + * [[!tails_gitweb config/chroot_local-patches/dhcp-dont-send-hostname.diff]] ## 3.7 Running Tails in virtual machines -- 2.11.4.GIT