[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
I've been duct-taping my way around this issue (and other similar issues) for years. It's terribly kludgy, but it's simple and effective and doesn't break on each upgrade: /etc/init.d/openvpn start while true ; do cp /etc/resolv.conf.good /etc/resolv.conf ; sleep 15 ; done Or something like that, anyway. I actually run 'vpn up' and 'vpn down', but the above is how it deals with having too many cooks in the DNS kitchen. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in Ubuntu. https://bugs.launchpad.net/bugs/90681 Title: resolv.conf overwritten using VPN/PPP etc... To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dhcp3/+bug/90681/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
** Tags added: patch -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in Ubuntu. https://bugs.launchpad.net/bugs/90681 Title: resolv.conf overwritten using VPN/PPP etc... To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dhcp3/+bug/90681/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
How to update nameserver in Network Manager and stop it from changing the /etc/resolv.conf after rebooting in Ubuntu 9.04 to 10.10 1. Open Terminal and type sudo su then press enter. 2. Type in gedit /etc/resolv.conf then press enter, you will then see your Network Managers nameserver usually 198.168.0.100, write down whatever the ip is then close terminal. 3. Right click Network Manager and select Edit Connections, left click Wired or Wireless, then left click Auto eth0 or eth1 or Auto whatever the name is for the wireless connection, left click Edit, then left click IPv4 Settings, tick box connect automatically, look at the Method box if it says Automatic (DHCP) left click the box and select Automatic (DHCP) addresses only, look at DNS servers and write in the box ***.***.***.***, ***.***.***.***, 192.168.0.100 or the ip you wrote down if it is diferent ( DO NOT TYPE THE *** TYPE IN THE IP NUMBERS OF THE NAMESERVERS YOU WANT TO USE), the commas are important as they are used to seperate the namservers addresses in the /etc/resolv.conf. Tick box Available to all users then left click apply and then type in your computer password when prompted and press apply. The first 2 nameservers are the nameservers you want to use and the 3rd is your DNS nameserver. Reboot and perform step 1 an 2 you will find the nameservers you typed in the Network Manager have not been changed. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. https://bugs.launchpad.net/bugs/90681 Title: resolv.conf overwritten using VPN/PPP etc... -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
I'm not sure why you think retrieving domain info from the DHCP server will do anything to help the problem, which is that the Ubuntu DHCP client is overwriting the resolv.conf file and replacing nameservers that were added due to VPN connections. -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
Adding domain info to "/etc/dhcp3/dhclient.conf" should fix this issue. This file will add domain info to "/etc/resolv.conf" (and will work with or without VPN). Use the following steps: 1.) At the terminal enter "sudo gedit /etc/hdcp3/dhclient.conf" (without quotes) 2.) find the line "#supersede domain-name "fugue.com home.vix.com";" 3.) remove the "#" sign at the front of the line to uncomment it. 4.) add your domain names to the line, i.e: "supersede domain-name "mydomain.com workdomain.com";" 5.) reboot -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
Is anyone ever going to do anything about this? I know it's not an easy problem but there are solutions here which will help at least some of the people and which are not harmful (for example, not updating /etc/resolv.conf on RENEW if the old nameserver is still present). If we could do at least that, then we'd solve this problem for a lot of people with little effort and no deleterious effects. Please?? -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
Hello I've been having similar problems and looking for a long time for a solution. Finally seems to have solved my problem. I do not understand how different installed packages decide to modify /etc/resolv.conf and sometimes without consideration to each other. In my case, I use NetworkManager to manage my connections. Simply put, the solution was to remove the package "resolvconf" and use "networkmanager" for wired, wireless and vpn. If you are using vpn connections, configure it through network manager (nm) and not through some other utility. There's a vpn for networkManager you need to install first. If you don't use the nm-vpn like I was, for a few minutes you have /etc/resolv.conf set up properly with the vpn dns , search and domain settings but sooner or later nm will overwrite your files and your vpn will be broken. So, using vpnc from the command line or other vpn tools won't do. I hope this helps others. As a suggestion for Ubuntu packagers, when installing networkManager, resolvconf should be one of those conflicting packages. Of course, there's probably a better solution. Cheers Chahé -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
Re: [Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
Tamas Herman wrote: > I have Jaunty (Netbook Remix) here with the same problem. > > I use blueman instead of bluez to establish PAN networking. > > I tried blueman in both of its modes > - blueman handles the interfaces > - let the network manager handle the interfaces > > In both cases i experience the resolv.conf being overwritten regularly. > > I also want to have my - maybe connection specific - search order present > there. > (Its a lot of hassle to write FQDNs with the sme.looong.tld :) Here is the ugly workaround I use that has the advantage of working all the time (I'm on a network where the DHCP lease time is around 10 minutes as part of the authentication system). You'll of course want to replace the name (office.fsf.org) and and address (192.168.0.25) of my private-network name servers with yours , and change the .in-addr.arpa lines to be your private network ranges. === Try at fixing PITA DHCP Lease Renewal breaks DNS problem === See also the Ubuntu bug [https://bugs.launchpad.net/ubuntu/+source/dhcp3/+bug/90681/ resolv.conf overwritten using VPN/PPP etc..] * replace network-manager with [http://wicd.sourceforge.net/download.php wicd] * aptitude install dnsmasq * remove the lines beginning with "script-security", "up", and "down" from /etc/openvpn/client.conf * Set /etc/resolv.conf to always point to the dnsmasq name server: rm /etc/resolv.conf echo nameserver 127.0.0.1 > /etc/resolv.conf chmod 444 /etc/resolv.conf chattr +i /etc/resolv.conf * Make one of these your /etc/dnsmasq.conf file: # # /etc/dnsmasq.conf minimal version # resolv-file=/etc/resolv.conf.dhclient-new server=/0.168.192.in-addr.arpa/192.168.0.25 server=/0.16.172.in-addr.arpa/192.168.0.25 server=/office.fsf.org/192.168.0.25 -- Daniel JB Clark | Sys Admin, Free Software Foundation pobox.com/~dclark | http://www.fsf.org/about/staff#danny -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
I have Jaunty (Netbook Remix) here with the same problem. I use blueman instead of bluez to establish PAN networking. I tried blueman in both of its modes - blueman handles the interfaces - let the network manager handle the interfaces In both cases i experience the resolv.conf being overwritten regularly. I also want to have my - maybe connection specific - search order present there. (Its a lot of hassle to write FQDNs with the sme.looong.tld :) -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
I installed jaunty and some of this is fixed - new NetworkManager is much more straight-forward as far as routing settings are concerned, and resolv.conf gets updated (with target DNS appearing before others in the file). I am still missing a connection-specific search domains, though... -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
Any updates? Is there a patch in the works for this? -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
Hi, When I started my notebook looking at the log entries I saw something like: resolvconf: unable to remove (...)/eth1/resolv.conf. File system read only. This entry does not appear in dmesg and syslog. But the behaviour is reproducable evey system start. Perhaps this helps fixing this annoying bug. Thanks. Michael. -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
Hi, I think I get the same problem here on my 8.10. I connect to different wireless LANs with my notebook. I also use openvpn and vpnc. My problem ist, that dhcpcd somehow REMEMBERS its resolv.conf configurations and still applies settings from different WLANs or VPNs when I connect to new WLANs. I have to edit my resolv.conf every time manually. Michael. -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
Thanks, Philip! Two questions: - It looks like this patch would stop renewing leases for *all* interfaces if *any* interface is using a VPN. - This looks very complicated to me: [ -n "( ifconfig -s | awk ' ( $1 ~ /^(tun|cipsec)/ ) {print $1}' )"] I'm no awk guru, but isn't that the same as ifconfig -s | egrep -q '^(tun|cipsec' ? -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
I've updated Markus K's patch to also check for Cisco's proprietary VPN client (interface name cipsec0). This happens to work for me because my VPN only uses DNS over the VPN so no matter what happens locally resolv.conf shouldn't change. ** Attachment added: "dhclient-script.patch" http://launchpadlibrarian.net/19517565/dhclient-script.patch -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
"I suppose some people might have problems if their VPN solution completely replaces /etc/resolv.conf. That might require a more sophisticated solution" This is the case for me. My resolv.conf gets replaced whenever I connect to my vpn. This is to avoid doing dns resolution on an untrusted network (e.g., free wifi at coffee shop). Also in cases where the network I'm on is sandboxed, such as the wireless segment of my lan, there is limited DNS resolution available. In this case, full dns resolution must be done at the trusted end of the tunnel. When the dhcp renewal blows away my "trusted" resolv.conf, then the result is either that DNS resolution moves to the untrusted network, or DNS resolution breaks because resolv.conf now points to the sandbox DNS address. -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
I hit this too; my company uses Juniper's NetworkConnect and it adds its own DNS servers as the first ones to search to /etc/resolv.conf. I disabled the download of the DNS server info altogether which is obviously not optimal, but works OK for me because I've installed a Linux image on my Linksys router and enabled dnsmasq, so my local LAN DNS server is always my router, which never changes, not my upstream ISP. But, when I configured a laptop for a friend they have this problem in spades. To me, anything that watches for changes to /etc/resolv.conf and tries to change things back again is just not reliable enough. Ditto for having scripts depending on seeing a tun0 or ppp0 or whatever interface. I think the right answer HAS to be a smarter dhclient script. It's the only one that seems reliable and robust. An easy answer that will help most of the time was already suggested: if the hostname to be added to resolv.conf already exists, then don't change resolv.conf. This seems like something that is obviously correct and won't cause any problems. This works for me because my VPN solution leaves the original nameserver entry in /etc/resolv.conf, it's just put at the bottom. I suppose some people might have problems if their VPN solution completely replaces /etc/resolv.conf. That might require a more sophisticated solution. -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
Using 7.04. Latest updates applied. This is still...still...still a problem. For now I just have a copy of the correct resolve.conf that I copy over the old one when I connect to my vpn. I have my vpn connection set to not use any of the dns stuff from the vpn server and have network- manager set only to use the vpn for a particular ip range. So when I connect to the vpn my resolve.conf just gets blanked out. I even manually set DNS info for my wirless setting in nm and that just gets dropped as soon as I vpn. I'll try some of the work arounds later, but this really should be resolved. -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
Still applies with 8.04 release. -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
Installing resolv.conf had been the solution for me, though it ain't no longer a solution. Some of the recent updates in the run-up to (still beta-buggy) 8.04 something installed that neuters the soultion via resolv.conf. In NetworkManager - Manual Configuration I have saved several configurations with different DNS servers. Before connecting to the VPN, I load one of them manually. Super-weirdly, the system needs a minute or two to get used to the alternate settings. Or you restart networking. Anyway, it ain't what it should be, and a permanent fix to this would be highly desirable, to make Ubuntu fit for a production environment. At this time, it is not fit for that. -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
BeBoxer: Thanks for that little script - works like a charm. -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
Try installing resolvconf (apt-get install resolvconf) -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
I took a stab at writing a script to be put into /etc/dhcp3/dhclient-enter-hooks.d to try and fix this problem. It is quite simplistic, and simply unset's new_domain_name_server if the value is the same as old_domain_name_server and reason is RENEW. The logic is, if it's a RENEW and the name server hasn't changed, then resolv.conf is either still up-to-date from when we BOUND the lease or it has been updated by some other program. In either case, we can leave resolv.conf along and assume it's contents are good. Really though, this logic should be in dhclient-script itself. After all, dhclient-script checks other important data to see if it's actually changed rather than just blindly updating it. There is no reason why the nameserver should be different. I can't think of any case where 1) it's a RENEW and 2) the nameserver hasn't changed, where updating resolv.conf is safer/better than leaving it alone. ** Attachment added: "save-vpn" http://launchpadlibrarian.net/13175077/save-vpn -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
Re: [Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
David, in a way you are right. I can either redefine the client script and put my own or I can take care that the ip is never renewed. I think it would be better to a have a default configuration in ubuntu that leaves resolv.conf alone when a vpn has been opened. Rgds Markus David schrieb: > I thing all the configuration that you want to do can be done in > /etc/dhclient.conf or similar. > > you can lookup information from the command line in man pages: > man dhclient.conf > > Hope this helps. > > David > > -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 90681] Re: resolv.conf overwritten using VPN/PPP etc...
I thing all the configuration that you want to do can be done in /etc/dhclient.conf or similar. you can lookup information from the command line in man pages: man dhclient.conf Hope this helps. David -- resolv.conf overwritten using VPN/PPP etc... https://bugs.launchpad.net/bugs/90681 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to dhcp3 in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs