This mini HowTo describes how the typical "home" linux user can "dial out on demand",
with out having to build a connection first then starting up their favorite internet utility (i.e. netscape).

First you will need to set-up ppp, the easiest way to do this
is through "linuxconf". Go to the networking section and enter
in your username, password and number that you use to dial
out to your ISP.

Next you will need to to make/edit "/etc/resolv.conf" :
nameserver 255.255.255.255
nameserver 255.255.255.255
Naturaly you need to replace "255.255.255.255" with your ISPs primary and secondary DNS.

now you will need to copy the newly created resolv.conf to /etc/ppp:
~>#cp /etc/resolv.conf /etc/ppp/resolv.conf

Now lets test the connection:
~>$ifup ppp0

Your modem should be dialing out now, if it's not check the files
in /etc/ppp for anything out of the ordinary.

To bring down the connection:
~>$ifdown ppp0

Lets setup the DoD now.
Fire up your favorite text editor and make a file called chat-hacks.
The contents of the file shoud look like this:

ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "BUSY
ABORT "ERROR"
ABORT "NO ANSWER"
ABORT "Username/Password Incorrect"
ABORT "Authentication Failure"
ABORT "Bad Password"
REPORT CARRIER
REPORT CONNECT
"" "at"
OK "ATZ"
OK "ATM1L2"
OK "ATDT5555555"
"ogin:" "yourusername"
"word:" "yourpassword"

Replace 5555555 with your ISPs phone number.
Save this file as /etc/ppp/chat-hacks

Now open up /etc/ppp/options and enter this in:

lock
defaultroute
noauth
demand
bsdcomp 15
receive-all
192.168.255.250:192.168.255.251
ipcp-accept-remote
ipcp-accept-local
holdoff 12

(If you don't have "Unlimted Internet Access" you can add "idle 300" to the end of options. This will disconnect you after 5 minutes of inactivity.)

Also, if you are dialing into a windows machine, you will need to add this to the end of options:

name "workgroup\\username"
remote-name "servername"

Take a look in /etc/ppp for a directory called peers
if it isn't there:
mkdir /etc/ppp/peers && cd /etc/ppp/peers

Now create a file with the following content:

ttySn 115200 crtscts
connect '/usr/sbin/chat -v -f /etc/ppp/chat-hacks'
noauth

Replace ttySn with whatever tty your modem is connected to.
Save this file as /etc/ppp/peers/isp

Lets test this out now:
~>$pppd call isp

~>$ping -c 1 antionline.com

your modem should have dialed out and pinged antionline

To bring down the connection:
~>$killall pppd

If it didn't dial out:
~>#tail /var/log/messages

This will display what went wrong so you can hopefully fix it.

So now whenever you use any program or utility that requiers an internet connection, your modem will/should dial out.
To start this everytime you boot edit /etc/rc.d/rc.local
and put this at the bottom:

pppd call isp

-----
|Taboo|
-----