From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SD5ea-0007cg-C7 for garchives@archives.gentoo.org; Thu, 29 Mar 2012 03:04:00 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 918A0E0D2E for ; Thu, 29 Mar 2012 03:03:59 +0000 (UTC) Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53]) by pigeon.gentoo.org (Postfix) with ESMTP id 7E0C7E0E97 for ; Thu, 29 Mar 2012 00:35:14 +0000 (UTC) Received: by vbbfc26 with SMTP id fc26so1346868vbb.40 for ; Wed, 28 Mar 2012 17:35:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=gHo6Pd3jwif6DLOgKhsv53VYBQBmOWlfLbeSZr6eKq0=; b=rTFToJrBLTB4YLiELuGKRc2uSvy1hEra4paImXXsEjFU1npOyKIQJD2F3ZAD7+bDW/ YPvOZq3Wsgju7nDSxSlPk8JHC7brBOQc95p0QfLrXGsZyGDib8jQBgQYK0domqoNx/ED SWE1wZdvoVYpqeWnEnMLiDTIJ2oWUj110kLIKLN7pxTEpvq04nehXW1vD+dfnJSUBCHQ hFo16eXkObPa+nz16N89iGlVQt4FOO+JAX/ce6/55+pWDxWnQbPv3EHzPsxnN5uQvzoM BixJ0xrZ34GpqVuAVHeHx+yN2xGtd2kVDTwrehPbffRe7W+B7y3/hqjL77vaUmK1/a8J rjXw== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.220.188.12 with SMTP id cy12mr14892083vcb.69.1332981314003; Wed, 28 Mar 2012 17:35:14 -0700 (PDT) Received: by 10.220.150.72 with HTTP; Wed, 28 Mar 2012 17:35:13 -0700 (PDT) In-Reply-To: References: Date: Wed, 28 Mar 2012 20:35:13 -0400 Message-ID: Subject: Re: [gentoo-user] ppp-gentoo woes cont'd [SOLVED-sorta] From: Joshua Murphy To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 6b3070c8-3f5e-4395-9ac3-00a404b46608 X-Archives-Hash: d22e6c32139363741aacea8f84b84e3d On Wed, Mar 28, 2012 at 4:05 PM, Maxim Wexler wrot= e: >>> >>>> with ppp connections you are not using a dhcp client, pppd gets the >>>> nameserver ip addressess as part of the connection negotiation (if >>>> peerdns is set) and the aforemetioned script in >>>> /etc/ppp/ip-up.d/40-dns.sh writes those to /etc/resolv.conf > > This is at the top of /etc/resolv.conf > # Generated by dhcpcd > # /etc/resolv.conf.head can replace this line > # /etc/resolv.conf.tail can replace this line > > But according to /var/log/messages: > > Mar 28 13:24:01 lumby pppd[16825]: primary =C2=A0 DNS address 75.153.176.= 1 > Mar 28 13:24:01 lumby pppd[16825]: secondary DNS address 75.153.176.9 > > But whatever is in resolv.conf is overwritten with blanks AFTER I > connect. Which creates this odd situation where I can ping numbers, > ie, 8.8.8.8 but not com, net, org etc. > > Once I "connect" I have to echo the DNS addresses into resolv.conf > before I can reach anything. > > Also, I notice whenever I set up a route to my router those numbers > get wiped. Is that the default behavio(u)r?. NB, I have nothing in the > way of services other than ppp configured at all. Maybe later after I > sort it all out I'll rig up something automatic. > > Thanks for everybody's hlp > > MW > > ps: =C2=A0according to /etc/ppp/ip-up.d/40-dns.sh: > > -------------------------------------------------------------------------= ------------------------------------------------------ > > #!/bin/sh > > # Handle resolv.conf generation when usepeerdns pppd option is being used= . > # Used parameters and environment variables: > # $1 - interface name (e.g. ppp0) > # $USEPEERDNS - set if user specified usepeerdns > # $DNS1 and $DNS2 - DNS servers reported by peer > > if [ "$USEPEERDNS" ]; then > > =C2=A0 =C2=A0 =C2=A0 =C2=A0if [ -x /sbin/resolvconf ]; then > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{ > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0echo "# Generated by ppp for $1" > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0[ -n "$DNS1" ] && echo "nameserver $DNS1" > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0[ -n "$DNS2" ] && echo "nameserver $DNS2" > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} | /sbin/resolvco= nf -a "$1" > =C2=A0 =C2=A0 =C2=A0 =C2=A0else > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# add the server s= upplied DNS entries to /etc/resolv.conf > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# (taken from debi= an's 0000usepeerdns) > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# follow any symli= nk to find the real file > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0REALRESOLVCONF=3D$= (readlink -f /etc/resolv.conf) > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if [ "$REALRESOLVC= ONF" !=3D "/etc/ppp/resolv.conf" ]; then > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0# merge the new nameservers with the other options from the old c= onfiguration > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0{ > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0grep --invert-match '^nameserver[[:sp= ace:]]' $REALRESOLVCONF > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cat /etc/ppp/resolv.conf > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0} > $REALRESOLVCONF.tmp > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0# backup the old configuration and install the new one > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0cp -dpP $REALRESOLVCONF $REALRESOLVCONF.pppd-backup > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0mv $REALRESOLVCONF.tmp $REALRESOLVCONF > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0# correct permissions > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0chmod 0644 /etc/resolv.conf > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0chown root:root /etc/resolv.conf > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fi > =C2=A0 =C2=A0 =C2=A0 =C2=A0fi > > fi > > -------------------------------------------------------------------------= ------------------------------------------------------- > > the software is aware of two resolv.confs, one under /etc/, one under > /etc/ppp. /etc/ppp/resolv.conf is correctly filled in, but the other > is wiped. Can anyone see why? > > MW > If I recall, this was my guess as the real problem you were running into. As for what's making the last change to /etc/resolv.conf... aside from kernel-level auditing, there's nothing I'm aware of that can tell you. Since /etc/ppp/resolv.conf is correct but /etc/resolv.conf isn't, one of three things is happening: a) 40-dns.sh is running, making the changes it needs to, and they're being promptly overwritten by something else... unlikely and excessively hard to diagnose, b) 40-dns.sh is running but isn't actually updating /etc/resolv.conf properly... it looks fine, matches the default I have here (which works on my pppoe setup at least), but could happen if one of the assumptions it makes is wrong (or if, say, if [ "$USEPEERDNS" ]; is coming up false), or... c) 40-dns.sh is not even running, meaning /etc/resolv.conf never gets updated by pppd... this would have been my first guess, except for the fact that /etc/ppp/ip-up just outright sources all *.sh in /etc/ppp/ip-up.d/ so... shouldn't be that (and I saved myself from looking a bit silly, checking that beforehand). The first step to tracking it down would probably be stepping through that script and comparing it to your situation. Does /etc/resolv.conf.pppd-backup exist? If so, it *is* at least making changes to the original. I recall usepeerdns is set, so is /sbin/resolvconf an existing, executable, file? If not, and since they differ, I suspect it's failing somewhere in merging them. You might add some echo calls writing out to a file in /tmp to 40-dns.sh so you can track what, if anything, it does (and what values it's using in the process). My best guess, if it is 'a', is that something in the style of networkmanager or the like, if you're running any such thing, is the culprit, but that's pulled pretty solidly from thin air here. --=20 Poison [BLX] Joshua M. Murphy