ppp server

Forum: Networking
Topic: ppp server
started by: och

Posted by och on June 30 2008,14:29
Now that I am able to dialog with my USRobotic modem through the serial port of my pc board (thanks to microcom), I'd like to be able to reach my pc board through the phone. I haven't found any ppp server extension for DSL. Does this mean I should try to apt-get something or have I missed something in the repository?
Posted by chaostic on June 30 2008,15:33
If you haven't found one in the repo,

Text version:
< http://www.swcp.com/~jgentry/pers.info >

Html version:
< http://linuxgazette.net/issue38/gentry.html >

Hope that helps.

Posted by curaga on June 30 2008,15:55
pppd is included in the base.
Posted by och on July 01 2008,07:42
I eventually understood pppd was also the tool on the server side. I actually have to work on what I put behind (ssh server?). I'll probably post on that later after some unsuccessfull trials.
I am facing now a more problematic issue with my ppp server:
The boot process stays stuck when my modem is powered on before the pc. My guess is that the modem is detected during the boot and perhaps the pc is trying to get an IP through it, which is a bad idea for a ppp server.
How could I avoid that?

Posted by curaga on July 01 2008,08:25
Try the "nodhcp" cheatcode to skip the ip fetching :)
Posted by och on July 03 2008,06:33
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.

Posted by och on July 16 2008,07:27
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
asyncmap 0
logfile /home/dsl/tmp/ppp.log

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...

Posted by curaga on July 16 2008,08:03
From pppd man page:
      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
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.
# Secrets for authentication using PAP                                            
# client                 server                  secret         IP addresses      
*                        *                       ""             ppp_client

Posted by och on July 16 2008,09:27
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...

Posted by och on Aug. 05 2008,14:05
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.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.