Primus Business Services - Help Center
Creating A Dialup Connection (Linux)
PDF Print To PDF

Connecting to Primus using Linux PPP

This guide will show you some general steps for setting up PPP. Please note that all of the setup instructions included here must be executed while logged in as root.

Before you start, you will need to first verify these three areas:

Firstly that you have PPP support already loaded in your Linux kernel. Some Linux systems ship with a module called ppp.o that may need to be loaded before PPP can be used. To determine if this required on your system, execute lsmod and see if ppp is listed; if not, execute lnsmod ppp to load it. Run lsmod again to see that ppp is listed. If you have recompiled your kernel with PPP support built in, this step won't be necessary. Most kernels at or above 2.0.29 should have PPP enabled. (Primus does not support recompiling the kernel or added modules to the kernel.)

Second that you have the correct nameserver IP addresses indicated in /etc/resolv.conf.

For a Primus userid, use and

For a Magma userid, use and

Thirdly and lastly, that you have your IP address listed in /etc/hosts as using an IP address of "". A typical /etc/hosts file for a system that will only network through dial-up PPP would look similar to this:

  •    localhost
  • yourmachinename

    With these areas taken care of, we can move on to the connect setup for Primus:

    Creating the dial-up configuration files

    There are two config files that need to be created: /etc/ppp/options and /etc/ppp/chart-script. The first sets up how you wish PPP to run, and the second automates the dial-up and login procedure.

    First, /etc/ppp/options

    connect "/usr/sbin/chat -f /etc/ppp/chat-script
    /dev/modem 38400 #modem is your device name
    modem #make pppd monitor the serial device
    asyncmap 0 #0 is zero, this is used for speedy ftp transfers
    crtscts #Use hardware flow control between the computer and modem
    defaultroute #setup routing table entry
    noipdefault #IP address for local host
    name mylogin #mylogin should be replaced by your Primus full email address, ex: This e-mail address is being protected from spambots. You need JavaScript enabled to view it

    Any text beginning with a '#' is a comment.

    The options is the file above are designed for a modem running at 28.8Kbs or higher, on a dial-up connection that dynamically allocates IP addresses (ie. Primus gives you a different IP address each time you connect.). If you have a static IP address, replace the noipdefault line with a line like this: (you must include the colon)

    Now, a simple /etc/ppp/chat-script file:

    '' ATDT6135551212
    CONNECT ''

    Replace the phone number above with the proper number for your dialing area.

    Simply stated (from the top down), this will abort the connection if the modem says it got a busy signal ; otherwise, it will dial the phone number 613-228-9329 and will send nothing after it gets the CONNECT string from the modem.

    Adjust the dial-up files for authentication

    Now you need to tailor the file you just created to fit Primus' dial-up requirements. Here is where the authentication Primus uses comes into play. The three most common types of authentication are Manual, PAP and CHAP. Note that you will only be using one of these authentication schemes; Primus uses PAP.

    PAP authentication requires two things: an /etc/ppp/pap-secrets file and the addition of the name option to the "basic" /etc/ppp/options file that you made earlier.

    Your pap-secret file should look like this:

    # Client Server Secret
    mylogin * mypassword

    Replace mylogin and mypassword with your username (full email address, ex: This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) and password respectively.

    Because this file contains private information,it would be a good idea to make it readable and writeable only by root, so change the permissions to 600:

    chmod 600 /etc/ppp/pap-secrets

    Running pppd

    Now to get connected to Primus run pppd (do this as user root)


    Or, if you would like to not have pppd "fork" into a background process (ie you would like to just hit CTRL-C to abort the PPP connection), you could use a command line:

    pppd -detach

    You could flip over to another console with Alt-Fkey or start another xterm if you're running this in X-Windows to interact with the Internet.

    If you chose not to use the -detach parameter, you can kill the PPP process by executing the following command:

    kill 'cat /var/run/'

    Make the file readable, writeable and executable only for the user root:

    chown root.root /usr/sbin/killppp

    chmod 700 /usr/sbin/killppp

    Debugging Techniques

    You can turn on debugging, to log the contents of all control packets exchanged between you and Primus by adding a few words to the /etc/ppp/options file.

    To log the activity of the kernel level PPP driver (which is not the same as pppd), you have to add together a sum of the options listed below and pass the number to the kdebug parameter in /etc/ppp/options. The options for kdebug are as follows:

    Value 1 = Enable general debugging messages
    Value 2 = Request that the contents of received packages be printed
    Value 4 = Request that the contents of transmitted packets to be printed
    There is no value 3.

    So, if you wish to log debugging information for transmitted packets as well as general kernel messages, you would add 4 and 1, then pass the number to kdebug in /etc/ppp/options:

    kdebug 5

    The debug messages are written to the file /var/log/messages.

    Get more information

    Your Linux man pages (ppp, pppd, ifconfig, and netstat)

    Try using an X GUI dialer:


Virtual Managed MachineLeveraging a Primus Virtual Managed Machine is the best way to manage your server infrastructure.
Learn More