Setting up a Linux system to establish a PPP connection with CSD.

Have the following information available:

  • Your user name (login ID)
  • Your password
  • 56k Dial-up Number: 303-583-3000
  • 33.6k Dial-up Number: 303-413-1074
  • Our domain name: csd.net
  • Primary DNS address: 204.181.152.51
  • Secondary DNS address: 204.181.152.140
  • SMTP (outgoing mail) server address: smtp.csd.net
  • POP3 (incoming mail) server address: pop3.csd.net
  • NNTP (news) server address: news.csd.net

Linux PPP Setup Scripts for Use With CSD.NET

These customized scripts are based on "Linux PPP HOWTO" by Robert Hart, hartr@hedland.edu.au and a copy is available from http://www.linux.org/docs/ldp/howto/PPP-HOWTO/index.html. Most distributions also include a copy of this HOWTO with their CD's.

These scripts have been tested on an Intel box running RedHat 5.1. Check your paths to the files pppd and chat. They should be in /usr/sbin. If not, modify the scripts below to their correct paths.

Many distributions include a graphical setup program for PPP. These programs somewhat automate the creation of these scripts. Due to the many variations, their use is not covered. Please refer to their included documentation.

References: Man pages ... pppd, chat, chmod, and the PPP HOWTO.

Linux does not use name server IP's sent from CSD.NET like Windows 95 clients do. Edit your /etc/resolv.conf file as follows:
-----------------------------------------------------
#/etc/resolv.conf
search csd.net
nameserver 204.181.152.51
nameserver 204.181.152.140
-----------------------------------------------------

Also check that the /etc/host.conf is set up correctly. It should look like this:
-----------------------------------------------------
#/etc/host.conf
order hosts, bind
multi on
-----------------------------------------------------

PAP AUTHENTICATION

Step one is to su to root. If you do not have the root password, then your administrator will need to install these scripts.

To connect to CSD.NET, five files will be needed. Cut and paste each of these, edit to your settings, and place in /etc/ppp/.

Shift-Click here to download a tar/gz archive of the 5 files below.

The first file is /etc/ppp/csd-on ...
(click to view)
(shift-click to download)

The second file is /etc/ppp/ppp-on-dialer ...
(click to view)
(shift-click to download)

The third file is /etc/ppp/options. Edit the LOGIN-NAME to your value. See the man page of pppd for an explanation of the options.
(click to view)
(shift-click to download)

The forth file is /etc/ppp/pap-secrets. Edit the and fields to your values. (Don't include the < > brackets)
(click to view)
(shift-click to download)

To log off from CSD.NET, use the fifth file /etc/ppp/ppp-off :
(click to view)
(shift-click to download)

(Shift-Click here to download ppp-off)

The next step sets the file permissions of the files.

As root, issue these commands:
chmod 755 /etc/ppp/csd-on
chmod 755 /etc/ppp/ppp-on-dialer
chmod 664 /etc/ppp/options
chmod 755 /etc/ppp/ppp-off
chmod 600 /etc/ppp/pap-secrets

To allow any user to activate the PPP Link, suid as root the file /usr/sbin/pppd. This is needed because the pppd daemon can be run only by root. Programs that run "suid root" are a potential security hole. Many programs are written to minimize this problem (including pppd) so it should be safe. For other options, such as using group permissions, see the HOWTO.

As root, issue this command:
chmod 4755 /usr/sbin/pppd.

An optional final touch for ease of use is to add two global aliases to the /etc/bashrc file. This will allow a user to connect to CSD.NET by typing csdon in a xterm window and disconnect by typing csdoff.

alias csdon='exec /etc/ppp/csd-on &'
alias csdoff='exec /etc/ppp/ppp-off &'

That's all! When your ppp-link is up, you can start any of the fine applications available.

Steve Grunwald (vian@csd.net)


File: /etc/ppp/csd-on
Click here to return

----------------------------------------------------------------------
#!/bin/sh
# /etc/ppp/csd-on
#
# Script to initiate a ppp connection. This is the first part of the
# pair of scripts. This is not a secure pair of scripts as the codes
# are visible with the 'ps' command.  However, it is simple.
#
# 
# This is the location of the script which dials the phone and logs
# in.  Please use the absolute file name as the $PATH variable is not
# used on the connect option.  (To do so on a 'root' account would be
# a security hole so don't ask.)
#
DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
#
# Initiate the connection
# 
# Most of the common options are in /etc/ppp/options.  Please, don't
# forget the 'lock' option or some programs such as mgetty will not
# work. The asyncmap and escape will permit the PPP link to work with
# a telnet or rlogin connection. You are welcome to make any changes
# as desired. Don't use the 'defaultroute' option if you currently
# have a default route to an ethernet gateway.
#
exec /usr/sbin/pppd connect $DIALER_SCRIPT
---------------------------------------------------------------------

File: /etc/ppp/ppp-on-dialer
Click here to return

------------------------------------------------------------------
#!/bin/sh
# /etc/ppp/ppp-on-dialer
#
# This is part 2. It dials CSD.NET and will perform the connection
# protocol for the desired connection. This file will not require editing.
#
exec /usr/sbin/chat -v                                  \
        TIMEOUT         3                               \
	ABORT           '\nNO DIAL TONE\r'              \
        ABORT           '\nBUSY\r'                      \
        ABORT           '\nNO ANSWER\r'                 \
        ABORT           '\nRINGING\r\n\r\nRINGING\r'    \
        ''              \rAT                            \
        'OK-+++\c-OK'   ATH0                            \
        TIMEOUT         30                              \
        OK              ATDT3035833000                  \
        CONNECT                                         
-------------------------------------------------------------------

File: /etc/ppp/options
Click here to return

-------------------------------------------------------------------
# /etc/ppp/options
#
/dev/modem 57600
-detach
modem
lock
crtscts
defaultroute
domain csd.net
user LOGIN-NAME   
asyncmap 0
--------------------------------------------------------------------

File: /etc/ppp/pap-secrets
Click here to return

--------------------------------------------------------------------
# /etc/ppp/pap-secrets
# Secrets for authentication using PAP
# client        server  secret                  IP addresses
<username>      ppp0   <password>
---------------------------------------------------------------------  

File: /etc/ppp/ppp-off
Click here to return

---------------------------------------------------------------------
#!/bin/sh
# /etc/ppp/ppp-off
#
# Determine the device to be terminated.
#
if [ "$1" = "" ]; then
        DEVICE=ppp0
else
        DEVICE=$1
fi

#
# If the ppp0 pid file is present then the program is running. Stop it.
if [ -r /var/run/$DEVICE.pid ]; then
        kill -INT `cat /var/run/$DEVICE.pid`
#
# If the kill did not work then there is no process running for this
# pid. It may also mean that the lock file will be left. You may wish
# to delete the lock file at the same time.
        if [ ! "$?" = "0" ]; then
                rm -f /var/run/$DEVICE.pid
                echo "ERROR: Removed stale pid file"
                exit 1
        fi
#
# Success. Let pppd clean up its own junk.
        echo "PPP link to $DEVICE terminated."
        exit 0
fi
#
# The ppp process is not running for ppp0
echo "ERROR: PPP link is not active on $DEVICE"
exit 1
---------------------------------------------------------------