Re: [gentoo-user] ppp-gentoo woes cont'd [SOLVED-sorta]
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 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: according 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 if [ -x /sbin/resolvconf ]; then { echo # Generated by ppp for $1 [ -n $DNS1 ] echo nameserver $DNS1 [ -n $DNS2 ] echo nameserver $DNS2 } | /sbin/resolvconf -a $1 else # add the server supplied DNS entries to /etc/resolv.conf # (taken from debian's usepeerdns) # follow any symlink to find the real file REALRESOLVCONF=$(readlink -f /etc/resolv.conf) if [ $REALRESOLVCONF != /etc/ppp/resolv.conf ]; then # merge the new nameservers with the other options from the old configuration { grep --invert-match '^nameserver[[:space:]]' $REALRESOLVCONF cat /etc/ppp/resolv.conf } $REALRESOLVCONF.tmp # backup the old configuration and install the new one cp -dpP $REALRESOLVCONF $REALRESOLVCONF.pppd-backup mv $REALRESOLVCONF.tmp $REALRESOLVCONF # correct permissions chmod 0644 /etc/resolv.conf chown root:root /etc/resolv.conf fi fi 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
Re: [gentoo-user] ppp-gentoo woes cont'd [SOLVED-sorta]
On Wed, Mar 28, 2012 at 4:05 PM, Maxim Wexler maxim.wex...@gmail.com wrote: 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 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: according 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 if [ -x /sbin/resolvconf ]; then { echo # Generated by ppp for $1 [ -n $DNS1 ] echo nameserver $DNS1 [ -n $DNS2 ] echo nameserver $DNS2 } | /sbin/resolvconf -a $1 else # add the server supplied DNS entries to /etc/resolv.conf # (taken from debian's usepeerdns) # follow any symlink to find the real file REALRESOLVCONF=$(readlink -f /etc/resolv.conf) if [ $REALRESOLVCONF != /etc/ppp/resolv.conf ]; then # merge the new nameservers with the other options from the old configuration { grep --invert-match '^nameserver[[:space:]]' $REALRESOLVCONF cat /etc/ppp/resolv.conf } $REALRESOLVCONF.tmp # backup the old configuration and install the new one cp -dpP $REALRESOLVCONF $REALRESOLVCONF.pppd-backup mv $REALRESOLVCONF.tmp $REALRESOLVCONF # correct permissions chmod 0644 /etc/resolv.conf chown root:root /etc/resolv.conf fi fi 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).
Re: [gentoo-user] ppp-gentoo woes cont'd
Since route and other things *are* getting set, I have the same strong suspicion Bill and YoYo have... DNS is likely not getting set properly in /etc/resolv.conf I always assumed that DHCP was writing this file automatically, so I never checked, but this time I made sure to check and viola! there they were. saved a bunch of likely files across the partition from ubuntu ... did that include dropping them into place on the Gentoo side naturlich MW
Re: [gentoo-user] ppp-gentoo woes cont'd
Maxim Wexler wrote: This brings back nightmares. It's been a while since I used dial-up but this sounds like a permissions issue. Check /etc/group and see if you are in ALL the following groups: tty uucp dialout utmp They're all in the file, if that's what you mean. You can also check the permissions of the ttySsome number here to see what it is. Mine is uucp. You shouldn't have to create a group so work with what you got for now. My devices are set to this: root@fireball / # ls -al /dev/ttyS* crw-rw 1 root uucp 4, 64 Mar 20 19:01 /dev/ttyS0 crw-rw 1 root uucp 4, 65 Mar 20 16:12 /dev/ttyS1 crw-rw 1 root uucp 4, 66 Mar 20 16:12 /dev/ttyS2 crw-rw 1 root uucp 4, 67 Mar 20 16:12 /dev/ttyS3 root@fireball / # lumby syzygy # ls -al /dev/ttyUSB0 crw-rw 1 root uucp 188, 0 Mar 20 16:25 /dev/ttyUSB0 lumby syzygy # Oh, USB modem. I stayed away from those. I always used a serial modem. Worth a shot tho. Dale :-) :-) -- I am only responsible for what I said ... Not for what you understood or how you interpreted my words! Miss the compile output? Hint: EMERGE_DEFAULT_OPTS=--quiet-build=n
Re: [gentoo-user] ppp-gentoo woes cont'd
On Wednesday 21 Mar 2012 03:00:50 Maxim Wexler wrote: This brings back nightmares. It's been a while since I used dial-up but this sounds like a permissions issue. Check /etc/group and see if you are in ALL the following groups: tty uucp dialout utmp They're all in the file, if that's what you mean. No, he means that your user is a member of the above groups. In my laptop (no analogue modem available) my user is only a member of uucp. You can also check the permissions of the ttySsome number here to see what it is. Mine is uucp. You shouldn't have to create a group so work with what you got for now. My devices are set to this: root@fireball / # ls -al /dev/ttyS* crw-rw 1 root uucp 4, 64 Mar 20 19:01 /dev/ttyS0 crw-rw 1 root uucp 4, 65 Mar 20 16:12 /dev/ttyS1 crw-rw 1 root uucp 4, 66 Mar 20 16:12 /dev/ttyS2 crw-rw 1 root uucp 4, 67 Mar 20 16:12 /dev/ttyS3 root@fireball / # lumby syzygy # ls -al /dev/ttyUSB0 crw-rw 1 root uucp 188, 0 Mar 20 16:25 /dev/ttyUSB0 lumby syzygy # You also need to be a member of the usb group. -- Regards, Mick signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] ppp-gentoo woes cont'd
Mick wrote: On Wednesday 21 Mar 2012 08:59:18 Mick wrote: On Wednesday 21 Mar 2012 03:00:50 Maxim Wexler wrote: This brings back nightmares. It's been a while since I used dial-up but this sounds like a permissions issue. Check /etc/group and see if you are in ALL the following groups: tty uucp dialout utmp They're all in the file, if that's what you mean. No, he means that your user is a member of the above groups. In my laptop (no analogue modem available) my user is only a member of uucp. You can also check the permissions of the ttySsome number here to see what it is. Mine is uucp. You shouldn't have to create a group so work with what you got for now. My devices are set to this: root@fireball / # ls -al /dev/ttyS* crw-rw 1 root uucp 4, 64 Mar 20 19:01 /dev/ttyS0 crw-rw 1 root uucp 4, 65 Mar 20 16:12 /dev/ttyS1 crw-rw 1 root uucp 4, 66 Mar 20 16:12 /dev/ttyS2 crw-rw 1 root uucp 4, 67 Mar 20 16:12 /dev/ttyS3 root@fireball / # lumby syzygy # ls -al /dev/ttyUSB0 crw-rw 1 root uucp 188, 0 Mar 20 16:25 /dev/ttyUSB0 lumby syzygy # You also need to be a member of the usb group. I forgot - also need to be a member of plugdev I believe. Good points. I remember running into this and I'm pretty sure I had to add myself to the uucp group. That was only after I beat my head against the wall for a few hours with the other groups tho. Remembering to logout and back in is what really drove me nuts. I didn't know that at first. I would suggest using Kppp if you can, at least until you get it working. There is a way to turn on logging in there that can help give hints. Thanks Mick for pointing out what I missed. Dale :-) :-) -- I am only responsible for what I said ... Not for what you understood or how you interpreted my words! Miss the compile output? Hint: EMERGE_DEFAULT_OPTS=--quiet-build=n
Re: [gentoo-user] ppp-gentoo woes cont'd
On Tue, Mar 20, 2012 at 09:09:06PM -0600, Maxim Wexler wrote: Since route and other things *are* getting set, I have the same strong suspicion Bill and YoYo have... DNS is likely not getting set properly in /etc/resolv.conf I always assumed that DHCP was writing this file automatically, so I never checked, but this time I made sure to check and viola! there they were. 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 saved a bunch of likely files across the partition from ubuntu ... did that include dropping them into place on the Gentoo side naturlich MW yoyo
Re: [gentoo-user] ppp-gentoo woes cont'd
Doesn't 40-dns apply only if the 'usepeerdns' option is set. As far as I can tell that option is not set. Maybe it should be. On 3/21/12, YoYo Siska y...@gl.ksp.sk wrote: On Tue, Mar 20, 2012 at 09:09:06PM -0600, Maxim Wexler wrote: Since route and other things *are* getting set, I have the same strong suspicion Bill and YoYo have... DNS is likely not getting set properly in /etc/resolv.conf I always assumed that DHCP was writing this file automatically, so I never checked, but this time I made sure to check and viola! there they were. 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 saved a bunch of likely files across the partition from ubuntu ... did that include dropping them into place on the Gentoo side naturlich MW yoyo
Re: [gentoo-user] ppp-gentoo woes cont'd
oh wait...it's set in /etc/ppp/peers/provider On 3/21/12, Maxim Wexler maxim.wex...@gmail.com wrote: Doesn't 40-dns apply only if the 'usepeerdns' option is set. As far as I can tell that option is not set. Maybe it should be. On 3/21/12, YoYo Siska y...@gl.ksp.sk wrote: On Tue, Mar 20, 2012 at 09:09:06PM -0600, Maxim Wexler wrote: Since route and other things *are* getting set, I have the same strong suspicion Bill and YoYo have... DNS is likely not getting set properly in /etc/resolv.conf I always assumed that DHCP was writing this file automatically, so I never checked, but this time I made sure to check and viola! there they were. 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 saved a bunch of likely files across the partition from ubuntu ... did that include dropping them into place on the Gentoo side naturlich MW yoyo
Re: [gentoo-user] ppp-gentoo woes cont'd
On Mon, Mar 19, 2012 at 10:33:27AM -0600, Maxim Wexler wrote: Just got back from gentoo land. Arrrgh, gmail won't let me attach files, just sits there spinning. So I'll have to make do with pastebin. http://paste.ubuntu.com/890854/ hmm, pppd seems to bring the connection up ok and also to get the DNS servers, however it might not set them correctly... what's in /etc/resolv.conf after you connect ? can you ping directly the other side of the ppp connection (ie 161.184.0.199 according to your logs): ping 161.184.0.199 can you ping anything on internet through ip addresss: ping 8.8.8.8 (8.8.8.8 are the google public dns servers) 30-wins.sh http://paste.ubuntu.com/890854/ 40-dns.sh http://paste.ubuntu.com/890857/ 50-initd.sh http://paste.ubuntu.com/890857/ 90-ntpd.sh http://paste.ubuntu.com/890857/ The first two don't apply. 50-initd.sh, I don't quite grok. you gave the same link for the last 3 ;) but 50-initd.sh takes care of the case, when pppd is run through gentoo scrips... in that case, when you run /etc/init.d/net.ppp0 start, the net.ppp0 service is marked as 'inactive' istead of 'started' because pppd didn't connect yet... when it connects, this script marks the net.ppp0 service as started... btw, i newer used pon, i either used gentoo initscripts, or directly started pppd ;), or sometimes used kppp from kde3 but if your problem is with dns, maybe the pon script / program doesn't start pppd with the usepeerdns option... (you might consider also adding the debug options to pppd options..., but you have to find out how to do that with pon) yoyo
Re: [gentoo-user] ppp-gentoo woes cont'd
yoyo Thanks for your response. I did some research(ppp documentation is OLD!) and saved a bunch of likely files across the partition from ubuntu, and rebooted into gentoo. Just for the heck of it I made myself root right from the boot console and ran pon isp without touching anything else, and boom! I was connected. The only difference from last time was that I ran pon right from the boot console instead of what I usually do, namely running startx, opening a terminal making myself root etc. I cannot fathom how that would make a difference. Can anybody out there in gentoo-world? Didn't even have to rmmod the wifi and ethx drivers. MW
Re: [gentoo-user] ppp-gentoo woes cont'd
On Tue, Mar 20, 2012 at 7:48 PM, Maxim Wexler maxim.wex...@gmail.com wrote: yoyo Thanks for your response. I did some research(ppp documentation is OLD!) and saved a bunch of likely files across the partition from ubuntu, and rebooted into gentoo. Just for the heck of it I made myself root right from the boot console and ran pon isp without touching anything else, and boom! I was connected. The only difference from last time was that I ran pon right from the boot console instead of what I usually do, namely running startx, opening a terminal making myself root etc. I cannot fathom how that would make a difference. Can anybody out there in gentoo-world? Didn't even have to rmmod the wifi and ethx drivers. MW Since route and other things *are* getting set, I have the same strong suspicion Bill and YoYo have... DNS is likely not getting set properly in /etc/resolv.conf and, barring that, something may be amiss with routing itself, which would be far less likely, but would be exposed by YoYo's recommendations there. As for why it works if handled very early, but not if brought up later, that seems odd to me, but... saved a bunch of likely files across the partition from ubuntu ... did that include dropping them into place on the Gentoo side, and was resolv.conf included in that? -- Joshua M. Murphy
Re: [gentoo-user] ppp-gentoo woes cont'd
Maxim Wexler wrote: yoyo Thanks for your response. I did some research(ppp documentation is OLD!) and saved a bunch of likely files across the partition from ubuntu, and rebooted into gentoo. Just for the heck of it I made myself root right from the boot console and ran pon isp without touching anything else, and boom! I was connected. The only difference from last time was that I ran pon right from the boot console instead of what I usually do, namely running startx, opening a terminal making myself root etc. I cannot fathom how that would make a difference. Can anybody out there in gentoo-world? Didn't even have to rmmod the wifi and ethx drivers. MW This brings back nightmares. It's been a while since I used dial-up but this sounds like a permissions issue. Check /etc/group and see if you are in ALL the following groups: tty uucp dialout utmp You can also check the permissions of the ttySsome number here to see what it is. Mine is uucp. You shouldn't have to create a group so work with what you got for now. My devices are set to this: root@fireball / # ls -al /dev/ttyS* crw-rw 1 root uucp 4, 64 Mar 20 19:01 /dev/ttyS0 crw-rw 1 root uucp 4, 65 Mar 20 16:12 /dev/ttyS1 crw-rw 1 root uucp 4, 66 Mar 20 16:12 /dev/ttyS2 crw-rw 1 root uucp 4, 67 Mar 20 16:12 /dev/ttyS3 root@fireball / # Sometimes pon/poff will need dialout for the program itself and tty to access the ttyS* device. Then that leads to you also needing uucp. Neat huh? Anyway, I suspect you need yourself added to the uucp group. I seem to recall running into this once too. I also had to add myself to utmp but I can recall why. I'm old, don't ask me to remember everything. lol If you have to change anything, don't forget to log out and back in. This is very true if you are logged into KDE. If you forget that, you will drive yourself ding bat crazy. o_O I hope this gets you going. I want this nightmare to end. lol Dale :-) :-) -- I am only responsible for what I said ... Not for what you understood or how you interpreted my words! Miss the compile output? Hint: EMERGE_DEFAULT_OPTS=--quiet-build=n
[gentoo-user] ppp-gentoo woes cont'd
Just got back from gentoo land. Arrrgh, gmail won't let me attach files, just sits there spinning. So I'll have to make do with pastebin. http://paste.ubuntu.com/890854/ Is a chronicle of the commands entered. First having booted and not changing anything, I do #ifconifg, then I do #route -n, then #pon isp to connect. Then there is the running tail of the messages log, ifconfig, route -n Next, rmmod the drivers. I do #poff isp to bring down ppp0, tail the messages, And so on... NB: the crash of the time daemon doesn't matter. Like everything else I need to work around the problem; in this case via a script in /etc/ppp/ip-up.d and /ip-down.d. The problem persists if I don't start the daemon at all. At the bottom of the file I've included the /etc/ppp/ip-up script. The scripts it refers to are here: 30-wins.sh http://paste.ubuntu.com/890854/ 40-dns.sh http://paste.ubuntu.com/890857/ 50-initd.sh http://paste.ubuntu.com/890857/ 90-ntpd.sh http://paste.ubuntu.com/890857/ The first two don't apply. 50-initd.sh, I don't quite grok. Hope somebody has the patience to go through this ;) MW
Re: [gentoo-user] ppp-gentoo woes cont'd
Have you checked it's not DNA related? - used IP numbers rather than urls in pings etc? Try panga/trace route to upstream IPs. BillK On 20/03/2012, at 0:33, Maxim Wexler maxim.wex...@gmail.com wrote: Just got back from gentoo land. Arrrgh, gmail won't let me attach files, just sits there spinning. So I'll have to make do with pastebin. http://paste.ubuntu.com/890854/ Is a chronicle of the commands entered. First having booted and not changing anything, I do #ifconifg, then I do #route -n, then #pon isp to connect. Then there is the running tail of the messages log, ifconfig, route -n Next, rmmod the drivers. I do #poff isp to bring down ppp0, tail the messages, And so on... NB: the crash of the time daemon doesn't matter. Like everything else I need to work around the problem; in this case via a script in /etc/ppp/ip-up.d and /ip-down.d. The problem persists if I don't start the daemon at all. At the bottom of the file I've included the /etc/ppp/ip-up script. The scripts it refers to are here: 30-wins.sh http://paste.ubuntu.com/890854/ 40-dns.sh http://paste.ubuntu.com/890857/ 50-initd.sh http://paste.ubuntu.com/890857/ 90-ntpd.sh http://paste.ubuntu.com/890857/ The first two don't apply. 50-initd.sh, I don't quite grok. Hope somebody has the patience to go through this ;) MW