Networking :: ppp server



Once again the problem is not where it seems to be. But it is not easy to track a bug during the boot process of a "black box" without screen...
I borrowed a regular laptop to put it in the same configuration. The boot process run nicely with and without nodhcp cheatcode. I noticed that knoppix-autoconfig was looking in /proc/net/dev to know on which devices it should try dhcp. /dev/ttyS0 was not among them even with a modem behind.
I am actually facing a known (and apparently unsolved) issue of the pc card I am working on (Soekris 4801) and, after spending some time in playing with the serial wires (soldering/unsoldering), I decided to move my modem on /dev/ttyS1 which does not freeze the whole card when it is connected to a modem.

I would need now some help on the login process in the pppd connection:
On DSL side I created a file /opt/ppp/options:
Code Sample
noauth
login
lock
-detach
192.168.3.1:192.168.3.2
asyncmap 0
netmask 255.255.255.0
proxyarp
defaultroute
crtscts
modem
persist
logfile /home/dsl/tmp/ppp.log
debug

and I manually run:
Code Sample
dsl@ttyp0[dsl]$ sudo pppd /dev/ttyS1 19200 &
[2] 2173

Then I initiate a ppp connection from a XP computer, giving user dsl and its password as login parameters.
Modems on both sides perform a correct handshake but the login does not go well.
On DSL side I get:
Code Sample
dsl@ttyp0[dsl]$ Using interface ppp0
Connect: ppp0 <--> /dev/ttyS1
Warning - secret file /etc/ppp/pap-secrets has world and/or group access
LCP: timeout sending Config-Requests
Connection terminated.
Using interface ppp0
Connect: ppp0 <--> /dev/ttyS1
Warning - secret file /etc/ppp/pap-secrets has world and/or group access
Modem hangup
Connection terminated.

[2]+  Exit 6                  sudo pppd /dev/ttyS1 19200

On XP side I just get the information that my login parameters are wrong.
This issue has got two aspect:
on the one hand I clearly have a problem with understanding the way pppd deals with logins.
on the other hand I don't get any information in DSL logs. In spite of syslog cheatcode, /var/log/syslog or /var/log/debug stay empty (that's where debug pppd option is supposed to redirect information). In /home/dsl/tmp/ppp.log I only get:
Code Sample
Device ttyS1 is locked by pid 1785

That's a bit short for me to understand what is going on...

From pppd man page:
Quote
      login  Use the system password database  for  authenticating  the  peer
             using  PAP,  and  record the user in the system wtmp file.  Note
             that the peer must have an  entry  in  the  /etc/ppp/pap-secrets
             file  as  well  as  the  system  password database to be allowed
             access.
Does your /etc/ppp/pap-secrets also have that entry for user dsl?


Edit: Here's an example pap-secrets allowing any user with any password from ip address ppp_client to connect. This is not bad, because the username and password still have to match system credentials to be allowed access.
Quote
# Secrets for authentication using PAP                                            
# client                 server                  secret         IP addresses      
*                        *                       ""             ppp_client

The only improvement I have got is getting some information in my logfile ~/tmp/ppp.log. I had forgot to kill the previous pppd prior to launching the new one and I was not working with my last options file.
In spite of the unrestrictive pap-secrets file proposed by curaga, I still have a problem for the login. What seems strange to me is the steady and lonely message (just the challenge value in magic changes between series of attempts):
Code Sample
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x595292b5> <pcomp> <accomp>]

This is on the DSL side (which acts as a server) and nothing seems to be received from the XP machine...

Just to close the issue.
I managed to connect to the dsl machine from an Ubuntu one after having discovered the existence of pon (and poff to hang up) which apparently knows how to run pppd in order to get an IP from a provider (configuration in /etc/ppp/peers/provider - just the phone number to change).
So the server configuration here above is OK on DSL side.
I eventually managed also to get a connection from an XP pc, but I don't know what the difference with my first trial was.

Next Page...
original here.