PPP-Callback for analog modems under Linux

In order to use the callback-facility, you should at least have pppd 2.3.11 (better 2.4.0) with the cbcp-patch enabled (which might not be true for the usual Linux-distributions. After installing the pppd from your distribution (or compiling the source - see README.cbcp on how to enable the callback support), try the command pppd callback 1111 . If it complains about the (undocumented) callback option, you need another pppd. A precompiled version for glibc-2.1 is HERE, the source tar-ball can be obtaind from HERE (a maybe oudated local copy of the tarball can be found here) . Read the README.cbcp how to enable the callback facility). The following files should be sufficient to setup callback:
  1. a script to start pppd. Put it somewhere in your path. (remember, in order to start pppd as non-root, you must chmod u+s /usr/sbin/pppd and (maybe) set the /dev/ttySx you are using to world-readable and -writable)
    #!/bin/sh
    #script for cbcp-callback
    
    umask 002
    
    /usr/sbin/pppd nodetach callback 0YOUR_NUMBER_HERE  \
    	connect "/usr/sbin/chat -f /etc/ppp/mpi-chat1"
    rc=$?
    sleep 1
    [ $rc = 14 ] && \
    	/usr/sbin/pppd connect "/usr/sbin/chat -f /etc/ppp/mpi-chat2" \
    	|| echo "Could not negotiate Callback. RC=$rc" 
    
  2. /etc/ppp/mpi-chat1 the dial script for requesting callback (you might have to modify the modemparameters)
    	ABORT 'BUSY' 
    	TIMEOUT 60
     	''		AT&F
            'OK'		ATS0=1
    	'OK'		ATDT32354446
            'CONNECT'       ''
    
  3. /etc/ppp/mpi-chat2 the dial script to wait for the call
    	ABORT 'BUSY' 
    	TIMEOUT 60
            'RING'          ''
            'CONNECT'       ''
    
  4. /etc/ppp/options optionsfile for pppd (modify /dev/ttyS0 and 38400-speed on your needs)
    /dev/ttyS0
    38400
    lock
    defaultroute
    ipcp-accept-local
    ipcp-accept-remote
    # usually you should not need the next line if your hostname is o.k.
    # name extYOURNAME
    # usually you should not need the next line if your host config is o.k.
    # remotename cisco3640
    
  5. /etc/ppp/chap-secrets the users and passwords for the Challenge-Response authentication requested by the cisco (this file should be readable and writable by root ONLY(!))
    # Secrets for authentication using CHAP
    # client        server        secret                  IP addresses
      extYOURNAME   cisco3640     callback-passwd         cisco3640.mppmu.mpg.de
      cisco3640     extYOURNAME   callback-passwd	      extYOURNAME.mppmu.mpg.de
    
  6. /etc/resolv.conf - tell your linux about the nameserver
    domain mppmu.mpg.de
    nameserver 134.107.2.100
    nameserver 134.107.2.180
    
  7. to stop the ppp-connection (after closing all ssh-/WWW-/*-sessions) just type
        killall pppd
    
Note:



Last modified: 23 May 2003, Uwe Leupold