Activity log for bug #90681

Date Who What changed Old value New value Message
2007-03-08 19:26:43 Daniel J Blueman bug added bug
2007-03-08 19:30:07 Daniel J Blueman description Binary package hint: dhcp3-client You open a VPN connection to another network (via PPTP through network manager or otherwise) - the /etc/resolv.conf file is updated with the DNS servers of the _remote_ network, however, dhcp3-client overwrites resolv.conf regularly with _local_ DNS server entries when the DHCP lease is *renewed*. The local DNS server entries are often useless in the target network, thus halt name resolution. The /sbin/dhclient-script bash script is called with reason=RENEW, which calls the function make_resolv_conf, overwriting /etc/resolv.conf. The renew time is often as low as 5 minutes for security, and is out of control of the linux user. One suitable fix is to not update resolv.conf when the DHCP lease is renewed [1]. I have been using this for some time and get the expected behaviour. Version is 3.0.4-12ubuntu3 (Feisty Herd 5), however this has been an issue for some time in dapper etc. To reproduce, simply lower the DHCP lease time and connect to any remote network (requiring different DNS servers). --- [1] --- /sbin/dhclient-script.orig 2007-03-08 19:19:56.000000000 +0000 +++ /sbin/dhclient-script 2007-03-08 19:19:46.000000000 +0000 @@ -13,6 +13,10 @@ # The alias handling in here probably still sucks. -mdz make_resolv_conf() { + # don't overwrite resolv.conf at RENEW time, since a VPN/PPTP tunnel may + # have updated it with remote DNS servers + [ "$reason" = "renew" ] && return + if [ -n "$new_domain_name" -o -n "$new_domain_name_servers" ]; then # Find out whether we are going to mount / rw exec 9>&0 </etc/fstab Binary package hint: dhcp3-client You open a VPN connection to another network (via PPTP through network manager or otherwise) - the /etc/resolv.conf file is updated with the DNS servers of the _remote_ network, however, dhcp3-client overwrites resolv.conf regularly with _local_ DNS server entries when the DHCP lease is *renewed*. The local DNS server entries are often useless in the target network, thus halt name resolution. The /sbin/dhclient-script bash script is called with reason=RENEW, which calls the function make_resolv_conf, overwriting /etc/resolv.conf. The renew time is often as low as 5 minutes for security, and is out of control of the linux user. One suitable fix is to not update resolv.conf when the DHCP lease is renewed [1]. I have been using this for some time and get the expected behaviour. Version is 3.0.4-12ubuntu3 (Feisty Herd 5), however this has been an issue for some time in dapper etc. To reproduce, simply lower the DHCP lease time and connect to any remote network (requiring different DNS servers). --- [1] --- /sbin/dhclient-script.orig 2007-03-08 19:19:56.000000000 +0000 +++ /sbin/dhclient-script 2007-03-08 19:19:46.000000000 +0000 @@ -13,6 +13,10 @@ # The alias handling in here probably still sucks. -mdz make_resolv_conf() { + # don't overwrite resolv.conf at RENEW time, since a VPN/PPTP tunnel may + # have updated it with remote DNS servers + [ "$reason" = "RENEW" ] && return + if [ -n "$new_domain_name" -o -n "$new_domain_name_servers" ]; then # Find out whether we are going to mount / rw exec 9>&0 </etc/fstab
2007-03-12 09:06:06 Martin Pitt dhcp3: status Unconfirmed In Progress
2007-03-12 09:06:06 Martin Pitt dhcp3: importance Undecided Medium
2007-03-12 09:06:06 Martin Pitt dhcp3: statusexplanation
2007-03-12 09:06:06 Martin Pitt dhcp3: assignee pitti
2007-04-02 07:51:06 Martin Pitt dhcp3: status In Progress Confirmed
2007-04-02 07:51:06 Martin Pitt dhcp3: statusexplanation This makes me a bit nervous, though, since it removes the possibility of updating name servers in non-VPN scenarios. At this point in the release cycle I'm too unconfortable with making such a change. I'll apply it early in Feisty+1.
2007-11-15 09:31:30 Markus K. bug added attachment 'dhclient-script.patch' (ubuntu 7.10 dhcp3-client vpn patch)
2008-03-19 14:04:03 Martin Pitt dhcp3: assignee pitti
2008-04-07 16:46:26 BeBoxer bug added attachment 'save-vpn' (save-vpn)
2008-11-09 19:21:20 Philip Jägenstedt bug added attachment 'dhclient-script.patch' (dhclient-script.patch)
2011-10-25 17:10:37 papukaija tags patch