Title: How do I configure SLIP/PPP on a Unix system for use with Dial IP? Question: How do I configure SLIP/PPP on a Unix system for use with Dial IP? Answer: The following instructions assume knowledge of the information provided in the FAQ titled "How do I configure my own (unsupported) Dial IP software?" It is located here: http://www.washington.edu/computing/faqs/plaintext/dialip.unsupported.setup Please read this FAQ before continuing. The information below assumes you already know the material presented there. Basic "chat" script for use with pppd ------------------------------------- In order to write a "chat" script, you must know which device is associated with your modem (we will assume "cua1" is the modem device in this example, and that it the modem can handle 19200 baud communications), the following could be used to start the pppd daemon: /usr/local/etc/chatscript '' ATZ OK ATDT*70,685-5599 CONNECT '' \ name: YOURLOGIN assword: 'YOURPASSWORD' '>>' ppp You then can create a script that starts the pppd daemon, telling it to execute this chat script in order to connect: /usr/local/etc/dialup /usr/sbin/pppd -d cua1 19200 defaultroute connect \ "/usr/sbin/chat -f /usr/local/etc/chatscript" See "man pppd" and "man chat" to learn about the syntax of a "chat" script and to ensure the paths to these programs are correct for your system. SECURITY NOTES -------------- WARNING: If you turn on logging for "chat" or "pppd", your password can end up in a syslog file that is readable to anyone on your system (or outside your system, if you serve the syslog spool directory via ftp or a web server). THIS CAN RESULT IN YOUR ACCOUNT OR SYSTEM BEING COMPROMISED. Please be careful with files containing your password to ensure they are NOT world readable. Call Waiting ------------ NOTE: The string "*70" is used to disable call-waiting on some telephone lines. Talk to your local telephone provider to verify if this is the correct way to temporarily stop call waiting on your line. If you DO NOT have call waiting, remove the "*70," from the above example. It is a good idea to disable call waiting (and prevent other telephone lines in your residence from being used) as a dropped carrier will break all TCP/IP connections and you will not be able to restart them when you reconnect. The above example script may need to be run as root (depending on file permissions of your modem device). Once connected, the pppd daemon will leave your modem connected until you send a SIGTERM signal to the pppd process. Assuming that your pppd daemon creates a file containing its process ID in /var/run/ppp0.pid, you can disconnect with this command: kill -TERM 'cat /var/run/ppp0.pid' An example script that handles making and breaking dialup connections might look like this: --------------------------------------------------------------------------- #!/bin/sh # dialip: script to handle Dial-IP connections # # Use the command "dialip up" to connect, and "dialip down" to # disconnect. If you have multiple accounts on this system, DO NOT LEAVE # THIS FILE WORLD READABLE since your ACCOUNT and PASSWORD are VISIBLE. # MODEM=/dev/cua1 # Modem device name SPEED=19200 # Modem speed (e.g., 14400, 19200, 28800) CALLWAITINGOFF="*70" # String to temporarily disable call waiting PHONE="685-5599" # Number of dial-in modem pool LOGIN="username" # Your login account name PASSWORD="as-if!" # Your password (See caution above) # Temporary file to contain the chat script. It is deleted each # time the pppd exits. TMP="$HOME/..dialip.chat.$$" # Set the umask so any created files -- the chat script -- are not # readable by anyone but the account that is running this script, # usually root. umask 077 if [ "$1" = "up" ]; then echo "Starting up Dial-IP" # Use "cat" to create the contents of the chat script using a # shell "here document" (all lines up to the one that # starts with "EOD") and file redirection. cat <$TMP '' ATZ OK ATDT$CALLWAITINGOFF,$PHONE CONNECT '' \ name: $LOGIN assword: '$PASSWORD' '>>' ppp EOD # Now start the pppd daemon using this chat script, # and have it delete the file after it exits. (/usr/sbin/pppd -d $MODEM $SPEED nodetach defaultroute connect \ "/usr/sbin/chat -s -f $TMP"; rm -f $TMP) & exit 0 elif [ "$1" = "down" ]; then echo "Bringing Dial-IP down" kill -TERM `cat /var/run/ppp0.pid` rm -f $TMP exit 0 elif [ "x$1" = "x" ]; then echo "usage: $0 [up | down]" exit 1 fi echo "$0: \"$1\" unknown option" exit 1 --------------------------------------------------------------------------- More information ---------------- The Linux NET-3 HOWTO document contains information that pertains specifically to configuration of the Berkeley NET-3 networking distribution and its SLIP/PPP capabilities (e.g., section 6.22). There is now also a separate HOWTO specifically on PPP configuration. Many versions of Unix can use the same software, so you may find installation instructions to be useful (especially if you use Linux, for which these HOWTO documents were written). See: http://sunsite.unc.edu/mdw/HOWTO/NET-3-HOWTO.html http://sunsite.unc.edu/mdw/HOWTO/PPP-HOWTO.html Date: 10/98 Author: dittrich