NetworkManager, VPN, resolv.conf

Zach uid000 at gmail.com
Wed Jul 18 12:07:47 UTC 2007


On 7/18/07, Zach <uid000 at gmail.com> wrote:
> On 7/18/07, Akshay Lamba <akshay at lambaweb.com> wrote:
> > Zach wrote:
> > > Anybody have a solution or workaround to this
> > Is this an openVPN connection? If it is, do you have "persist-tun" as
> > part of your conf?
> >
> > A
> >
>
>
> It's both openvpn as well as vpnc, so not openvpn specific.
>
> I'm not sure what persist-tun would do for me, since the problem is
> resolv.conf getting clobbered at dhcp renewal.  The tunnel stays up
> just fine.  If I manually copy the proper resolve.conf back,
> everything is happy again.
>
> The resolv.conf gets clobbered like clockwork at every dhcp renewal.
> The next renewal is always identified in
> /var/lib/dhcp3/dhclient.<interface>.leases
>
> I had just never noticed this problem before now, due to the very
> short renewal period (30 min) of the network I'm plugged into.
>
> Zach
>

Forgot to mention, I submitted a bug, for what it's worth:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/126592

Further, I'm not sure if this is a network-manager bug or a dhclient
bug.  It seems that maybe dhclient should be updated to be
"network-manager aware" such that it won't overwrite a resolv.conf
which was created by network-manager.

Also, I don't think this bug just pertains to vpn connections, but
rather vpn connections are where breakage is most likely to occur.

If you look at a resolv.conf after connecting (vpn or not) via network
manager, you'll see:
# generated by NetworkManager, do not edit!
at the top.

I think after dhcp renewal, that line will go away, even if you're not
connected to a vpn.  It's just that unless you have some situation
where the nameserver provided by dhcp isn't the one you want, such as
a vpn, you probably won't experience breakage.  In any case, I think
network-manager's resolv.conf gets clobbered, which is not good, even
if it doesn't cause breakage.

Zach




More information about the ubuntu-users mailing list