These devices offer a service called Dialback which, after identifying yourself, hangs up on you, and calls you back a second later, usually either to a predefined number (not useful if you're in some motel room) or to a number your specify after logging in. This last part is usually handled by something called the CallBack Configuration Protocol, or CBCP for short.
Most Linux distributions ship with some form of a PPP daemon, pppd, for short. Most, however, do not have the pppd compiled for CBCP. You need to correct this, plus configure it.
/etc/ppp/dial-out:
#!/bin/bash
# set -x
# variables
DIALIN=<your company's phone number here>
export DIALIN
if [ $# -ne 2 ]
then echo -n "UserID: "
read USER
echo -n "SecurID: "
read SECURID
export USER SECURID
else export USER=$1
export SECURID=$2
fi
/usr/sbin/pppd /dev/modem 115200 file "/etc/ppp/options.nt"
sleep 1
/usr/sbin/pppd /dev/modem 115200 file "/etc/ppp/options-callback.nt"
echo Finished, press CR...
read bla
You can provide the script with two parameters, the userID and the password,
in this case the secret number from a SecurID card. If you call it without
parameters, or a wrong number of parameters, it will interactively ask for the
correct values.The variables $USER and $SECURID are evaluated in the chat scripts we'll come to in a second. Note that there are actually two invocations of pppd - one to dial out and log into the router, and the second to accept the router's dialback.
Substitute the correct phone numbers for $DIALIN (your company's dial-in router) and $DIALBACK (your own phone number).
/etc/ppp/options.nt:
connect '/usr/sbin/chat -v TIMEOUT 120 \ ABORT BUSY \ ABORT "NO DIALTONE" \ ABORT ERROR \ ABORT "NO CARRIER" \ "" +++ATZ \ OK ATS0=1X0E1DT$DIALIN \ CONNECT "" \ ogin: "$USER" \ assword: "$SECURID"' crtscts bsdcomp 15 lock debug noipdefault ipcp-accept-local ipcp-accept-remote -d # Enter your phone number after the callback option callback 123-1234 -detach receive-allThis is the chat script that talks to the Ascend router and provides the userID, the SecurID (password), and starts ppp on the Ascend. Note that you must change 123-1234 to the number you dial.
/etc/ppp/options-callback.nt:
connect '/usr/sbin/chat -v -f /etc/ppp/nt-callback.chat' asyncmap 0 crtscts bsdcomp 15 lock debug noipdefault ipcp-accept-local ipcp-accept-remote -d lcp-echo-interval 20 lcp-echo-failure 2 -detach receive-allThis is the second script, /etc/ppp/options-callback.nt, which is shorter than the first one simply because it uses an external chat script, /etc/ppp/nt-callback.chat, immediately below.
/etc/ppp/nt-callback.chat:
TIMEOUT 120 ABORT "BUSY" ABORT "NO ANSWER" "" ATZ OK "" RING ATA CONNECT ""Very straight forward. Waits for "RING" from the modem, then goes off hook (ATA) and accepts the call.
By now, you should have four files which is basically all you need. Leave the files ppp-on, ip-up, and ip-down in /etc/ppp as they are. Copy and paste the four files from above, change your phone numbers appropriately, make sure to do a chmod u+x /etc/ppp/dial-out, and start the connection by typing /etc/ppp/dial-out <UID> <PW>, replacing <UID> and <PW> with your user ID and password.
Check your /var/log/messages files for output from pppd (there will be lots) and see how it talks to the router. This is the best way to debug what's going on.