Realtime Communications Help Center

Linux / Unix / BSD

PPPD-CHAT

 

Connecting to the Internet using PPP is probably the most confusing and rewarding experience. When you install the package PPP you will have two binaries under /usr/sbin. One is called pppd which is used for initializing the PPP connection according to your needs. The second binary is called chat, which is responsible for the communication with your modem. There are really hundreds of ways to setup a connection to the Internet using pppd and chat. We are going to show you one of those ways, then you can take it from there and create your own way of using PPP.

  • First you will need to type su to switch to the root user. Most of the changes you will be making require root access to save the files.
  • Next you will need to setup your DNS server information. This is stored in the file /etc/resolv.conf. You can edit this file with any text editor, such as vi, pico, or ed. The contents of this file should be as follows:
    • # Begin file: /etc/resolv.conf
    • search realtime.net
    • nameserver 205.238.128.39
    • nameserver 205.238.128.42
    • # End file: /etc/resolv.conf
  • Change to the /etc/ppp directory by typing cd /etc/ppp
    We will be editing/creating four files in this directory. The first file is called options.
    Its contents are as follows:

    lock
    asyncmap 0
    mru 552
    mtu 552
    defaultroute
    0.0.0.0:0.0.0.0
    crtscts
    debug
    -detach
    modem
    /dev/modem
    57600
    user username@realtime.net

  • Make sure you replace username with your real username
  • Next we will edit pap-secrets. Its contents are as follows:

    username@realtime.net * password

  • Make sure you replace username and password with your actual username and password.
  • Now we move on to ppp-on. Its contents are as follows:

    #!/bin/sh
    /usr/sbin/pppd file /etc/ppp/options connect '/usr/sbin/chat -v ABORT \
    "NO CARRIER ABORT "NO ANSWER" ABORT "BUSY" "" ATDTnumber CONNECT'

  • Make sure you replace number with your local dialup number. (found here)
  • The last file is called ppp-off. Its contents as as follows:

    #!/bin/sh
    kill -INT `cat /var/run/ppp0.pid`

  • Now you need to set the permissions for these files. Type the following commands:

    cd /etc/ppp
    chown root.root *
    chmod 600 pap-secrets
    chmod 755 ppp-on
    chmod 755 ppp-off
    chmod 644 options

  • Make sure you add the /etc/ppp directory to your PATH variable.

You should now be set to connect! To make the connection, type ppp-on. To disconnect, type ppp-off.