Tuesday, March 01, 2005

PPP Server

1) Edit inittab and add following line

s1:2345:respawn:/usr/sbin/mgetty ttyS0

2) Change pppd to setuid

chmod 4755 /usr/sbin/pppd

3) Create /etc/ppp/pap-secrets file with this content

#user server secret addrs
* * """" *
ullas * - *
root * - *
bin * - *
deamon * - *

4) Create file /etc/ppp/options.ttyS0

192.168.0.1:192.168.0.100

5) Create file /etc/ppp/options.server

-detach
asyncmap 0
modem
crtscts
lock
require-pap
refuse-chap
login
proxyarp
ms-dns 192.168.0.1

6) Check /etc/pam.d/login and make sure the following line is commented out:

auth required pam_dialup.so
insert a # in front of the line to comment out.

7) In /etc/mgetty+sendfax/login.config add following file.

/AutoPPP/ - @ /usr/sbin/pppd file /etc/ppp/options.server

8) In /etc/bashrc file add the following line

alias ppp="exec /usr/sbin/pppd -detach"


9) Now create a normal user as follows.

elango:x:522:100:Elangovan:/tmp:/etc/ppp/ppplogin

10) Now create /etc/ppp/ppplogin

#!/bin/sh
mesg -n
stty -echo
exec /usr/sbin/pppd crtscts modem passive auth

No comments: