[SOLVED] ppp won't work after Wicd rewrites /etc/resolv.conf

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
User avatar
Dennola4
Posts: 172
Joined: 7. Sep 2010, 18:25
Location: San Diego, CA, USA

[SOLVED] ppp won't work after Wicd rewrites /etc/resolv.conf

Post by Dennola4 »

The good news: Because you guys helped me develop an RYSNC back-up strategy awhile ago I can still get online. :!: :P :!:

The bad news: I have a bit of a connectivity issue. Usually I connect with a Sprint Wireless Card using chat scripts in /etc/ppp/peers. It connects at start up with sudo /usr/sbin/pppd call cdma.

Yesterday I decided to connect to my wife's network. I terminated the ppp connection (ppp-off), opened Wicd Network manager, scanned for networks, chose my Realtek usb card at wlan0 (rather than the Broadcom PCI at eth0), entered her WEP passphrase and I was on the Internet. So far so good. She needed to leave, taking away her phone (and thus my hotspot), so I tried to connect again with my ppp. The results are below:

Code: Select all

dennis[~]$ su
Password: 
root[dennis]# ping www.google.com
ping: unknown host www.google.com
root[dennis]# /usr/sbin/pppd call cdma
Device ttyUSB0 is locked by pid 1971
root[dennis]# ps aux | grep 1971
root      1971  0.0  0.1   2988  1120 ttyUSB0  Ss+  12:05   0:00 /usr/sbin/pppd call cdma
root      2083  0.0  0.0   2396   816 pts/0    S+   12:08   0:00 grep 1971
root[dennis]# kill 1971
root[dennis]# /usr/sbin/pppd call cdma
Starting Sierra Wireless CDMA connect script...

Setting the abort string

Initializing modem

Dialing...
Script /usr/sbin/chat -v -t6 -f /etc/ppp/peers/cdma_chat finished (pid 2091), status = 0x0
Serial connection established.
using channel 2
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x5422339e> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x6 <asyncmap 0x0> <magic 0xd3132926> <pcomp> <accomp>]
sent [LCP ConfAck id=0x6 <asyncmap 0x0> <magic 0xd3132926> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x5422339e> <pcomp> <accomp>]
sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [LCP DiscReq id=0x7 magic=0xd3132926]
rcvd [IPCP ConfReq id=0x8 <addr 68.28.185.85>]
sent [IPCP ConfAck id=0x8 <addr 68.28.185.85>]
rcvd [LCP ProtRej id=0x9 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [IPCP ConfNak id=0x2 <addr 174.148.77.126> <ms-dns1 68.28.186.91> <ms-dns2 68.28.178.91>]
sent [IPCP ConfReq id=0x3 <addr 174.148.77.126> <ms-dns1 68.28.186.91> <ms-dns2 68.28.178.91>]
rcvd [IPCP ConfAck id=0x3 <addr 174.148.77.126> <ms-dns1 68.28.186.91> <ms-dns2 68.28.178.91>]
local  IP address 174.148.77.126
remote IP address 68.28.185.85
primary   DNS address 68.28.186.91
secondary DNS address 68.28.178.91
Script /etc/ppp/ip-up started (pid 2094)
Script /etc/ppp/ip-up finished (pid 2094), status = 0x0
This confuses me, because this is what it looks like when I have a connection, yet I couldn't ping any hosts. Anyway, I swapped out my HDD for an identical (bootable) backup HDD and everything was fine. I used it to fix the original HDD and the (pertinent) rsync results were:

Code: Select all

etc/
etc/adjtime
etc/ld.so.cache
etc/motd
etc/mtab
etc/ntp.conf
etc/random-seed
etc/resolv.conf
etc/gtk-2.0/i486-slackware-linux/gdk-pixbuf.loaders
etc/gtk-2.0/i486-slackware-linux/gtk.immodules
etc/ntp/
etc/ntp/drift
etc/pango/i486-slackware-linux/pango.modules
etc/ppp/resolv.conf
etc/udev/rules.d/
etc/udev/rules.d/70-persistent-net.rules
etc/wicd/manager-settings.conf
etc/wicd/wired-settings.conf
etc/wicd/wireless-settings.conf
Given this info, what do you think is going wrong and how do I fix it so that I can toggle between using my ppp and my wicd?

Thanks in advance. :| :| :|
Last edited by Dennola4 on 16. Dec 2010, 08:58, edited 1 time in total.
There are no stupid questions.
User avatar
pwatk
Posts: 474
Joined: 14. Mar 2010, 23:56
Location: United Kingdom

Re: After using Wicd Network Manager, Cannot connect with PP

Post by pwatk »

I've never used ppp but I would suggest just checking your resolve.conf entries as this has tripped me up in the past.
Image
User avatar
Dennola4
Posts: 172
Joined: 7. Sep 2010, 18:25
Location: San Diego, CA, USA

Re: After using Wicd Network Manager, Cannot connect with PP

Post by Dennola4 »

YEP. You are right. I took the following steps:

1) I backed up the /etc directory recursivey to /etc.bak
2) downloaded meld from the Salix repo
3) signed on to an available network through Wicd Network Manager (using wlan0)
4) disconnected and attempted to connect with ppp (FAIL)
5) ran meld as root (su -) and compared the directory /etc.bak to /etc, where I found several things had changed, but the only one of interest was /etc/resolv.conf. The original file contained this:

Code: Select all

search SPRINT
nameserver 195.128.182.5
Whereas the new file now said:

Code: Select all

Generated by dhcpcd
# /etc/resolv.conf.head can replace this line
# /etc/resolv.conf.tail can replace this line
I changed it back to what it had said originally and it's fine.

So my two questions are:


1) how do I prevent dhcpcd from doing this?
2) Do I need the files /etc/resolv.conf.1187, etc/resolv.conf.2224 and etc/resolv.conf.2247, which all have the "Generated by.....replace this line" text?

Thanks! :-)
There are no stupid questions.
User avatar
gapan
Salix Wizard
Posts: 6362
Joined: 6. Jun 2009, 17:40

Re: After using Wicd Network Manager, Cannot connect with PP

Post by gapan »

If wicd is enabled, it will replace the contents of resolv.conf when it is started. So, you either need to make a script that changes it back to the one that works with your ppp connection and run that script every time you need to connect, or you can use an alternative DNS provider, like opendns or google dns.
Image
Image
User avatar
Dennola4
Posts: 172
Joined: 7. Sep 2010, 18:25
Location: San Diego, CA, USA

Re: After using Wicd Network Manager, Cannot connect with PP

Post by Dennola4 »

Wanna laugh??

I made two files, one called /etc/resolv.conf.head containing the first line:

Code: Select all

search SPRINT
and one called /etc/resolv.conf.tail containing the second line:

Code: Select all

nameserver 195.128.182.5
...and that's all it took. Thanks as always.:)
There are no stupid questions.
Post Reply