Many thanks to of France for this great PPP Howto. Phil tested in on his iMac and its being provided un-modified.

iMac ppp configuration

1. The first step is to set up the various configuration files in the /etc directory.
For the following, I've set my machine name to something more interesting
than "localhost", in this case "imax". You may wish to give your machine
a more interesting name too, so replace all occurences of "imax" in what
follows with the name you choose for your machine.

We'll also declare a domain name, which will make sense only when your ppp link
is up, so you may wish to choose the domain name of your internet service
provider (or ISP). Mine happens to be wanadoo.fr, yours may be aol.com or value.net
or acme.net or whatever.

So here are the file to set up:

a) /etc/hosts.deny should contain the line:

ALL: ALL

while /etc/hosts.allow should contain

ALL: LOCAL

b) We give a name to the machine in the /etc/HOSTNAME file;
mine contains the sole line:

imax

Yours should contain your machine's name (whatever you choose).

c) Now we set up the /etc/resolv.conf file:

search wanadoo.fr
nameserver 193.252.19.3
nameserver 193.252.19.4

The first line simply appends domain names to names;
if I run "telnet perso" from a terminal, the system will look
for "perso" as well as "perso.wanadoo.fr" on the net. If you change the
first line to "search ." (with the period), then "telnet perso" will
look for "perso" as is.
Also, change the nameserver numbers to those furnished to you by your ISP.
Use one line per nameserver IP number, as in the above example.

d) The /etc/hosts file can be configured as follows:

127.0.0.1 localhost loopback
0.0.0.0 imax

The first line is standard (perhaps already on your machine), the second line
gives your machine a new identity (here, the name "imax" which you should change to your machine name),
once the network connection comes up.

e) Finally, the /etc/mailname file contains the line:

wanadoo.fr

Replace this, of course, with that corresponding to your ISP
(e.g., aol.com, value.net, or whatever).

2. Now we set up ppp and the associated files.

a) Although ppp can be configured to be run manually
(by typing "pppup" or something similar from a command line, as we'll do),
it's may be preferable to seek a ppp front end, since then you can launch
ppp with a single mouse click, and the front end may come with candidate
configuration scripts that you need only modify.
If you use KDE, you already have kppp; for Window Maker there's wmppp,
for Afterstep there's asmodem, and so forth.

The scripts to follow are adapted from wmppp, but they're fairly generic.
The only "specialized" part is the chat script below, which works fine on my
iMac internal modem.
The files are set up to be run "manually";
you can also run them from a front end (e.g., asmodem, wmppp, etc)
by following the instructions furnished with your ppp front end.

b) We'll create the "pppup" and "pppdown" scripts, say in /usr/local/bin;
here are what mine look like:

[imax]$ more /usr/local/bin/pppup
#!/bin/sh

/usr/sbin/pppd connect '/usr/sbin/chat -v -f /etc/ppp/chatscript'

[imax]$ more /usr/local/bin/pppdown
#!/bin/bash
DEVICE=ppp0

if [ -r /var/run/$DEVICE.pid ]; then
kill -INT `cat /var/run/$DEVICE.pid`

if [ ! "$?" = "0" ]; then
rm -f /var/run/$DEVICE.pid
echo >/dev/console "ERROR: Removed stale pid file"
exit 1
fi

echo >/dev/console "PPP link to $DEVICE terminated."
exit 0
fi

echo >/dev/console "ERROR: PPP link not active on $DEVICE"
exit 1

These may be set with file permission 755:

[root]# chmod 755 /usr/local/bin/pppup
[root]# chmod 755 /usr/local/bin/pppdown

c) There are two file depencies here: pppd (the ppp daemon) in /usr/sbin,
and the chat script which we'll put in /etc/ppp/chatscript., to be read by the /usr/sbin/chat program.
Make sure that pppd and chat can be run with root privileges, by running as root

[root]# chmod 4755 /usr/sbin/pppd
[root]# chmod 4755 /usr/sbin/chat

Without this step, you can't open the ppp connection from your daily user account.
We'll also need a working chatscript. This is what mine looks like,
and it works on the internal iMac modem.

[root]# more /etc/ppp/chatscript
ABORT BUSY
ABORT 'NO CARRIER'
ABORT 'RING - NO ANSWER'
REPORT CARRIER
REPORT CONNECT
""
ATZ "OK"
ATDT12345678 CONNECT
"" ogin: "yourlogin"
sword: "qyourpassword" ""

Of course, you should replace the string 12345678 withe the dial-in number
of your ISP, and replace the strings yourlogin and yourpassword with
the login and password to access your internet connection; keep them inside
the quotes as shown.
(The q hides your connection password from the transcript and log files, for security).
This file must be created as root, and to be sure that no one else can read your
login name and password (aside from root and chat), execute as root

[root]# chmod 600 /etc/ppp/chatscript

The modem initialization string is provided by the line

ATZ "OK"

which works in most cases. If you want more control over the modem initialization,
you can replace this line with

AT&FW2S7=75 "OK"

for a V.90 connection (up to 57.6 kbytes/sec). If that doesn't work (due to a poor quality phone line) you may have
to drop to a V.34 connection (up to 33.6 kbytes/sec) by using instead the initialization string

AT&FW2S7=75+MS=11 "OK"

More on initialization strings for the iMac internal modem can be found at

d) The /etc/ppp/pap-secrets file should look like this:

[root]# more pap-secrets

# Secrets for authentication using PAP
# client server secret IP addresses
yourlogin * yourpassword

Replace yourlogin and yourpassword with those required to
access your internet connection. This file should also be edited as root and have 600 permission,
just like the chatscript file we just created.

e) Finally, we should have an /etc/ppp/options file.
Yours probably has a sole line containing the word "lock";
mine looks like this:

[imax]$ more /etc/ppp/options

lock
asyncmap 0
#
# which device, what port/connect speed
#
/dev/modem 57600
#
# maximum transfer unit and maximum receive unit.
#
mru 1500
mtu 1500
#
# bsd compression: bsdcom nr,nt
# compress packets on receive and transmit, with maximum code size
# nr and nt bits, respectively (valid range: between 9 and 15).
# Larger values give better compression but consume more kernel memory.
#
bsdcomp 10,10
#
# hardware flow control
#
crtscts
#
# if you want to periodically touch the other end to make
# sure it's still alive, set these options.
#
lcp-echo-interval 20
lcp-echo-failure 3
#
# set ppp link as default route once link comes up
#
defaultroute

The numbers above can be adjusted or optimized; those above work on my iMac
(and on other machines) and their "optimization" is not pursued here.

Also, check that /dev/modem is set up on your machine:

[imax]$ ls -l /dev/modem

lrwxrwxrwx 1 root root 10 Apr 12 19:42 /dev/modem -> /dev/ttyS0

If /dev/modem doesn't exist, link it to /dev/ttyS0 as follows (and as root):

[root]# ln -s /dev/ttyS0 /dev/modem

3) Now go get a cup of coffee (or whatever you like) and reboot
your machine.

After logging in, open an xterm or rxvt (or any terminal emulator with a scroll bar),
su to root, and run

[root]# tail -f /var/log/messages

Then, from another terminal instance (or from your ppp front end),
start ppp by typing

[imax]$ pppup

The terminal window running "tail -f /var/log/messages"
should spit out messages similar to this:

Apr 25 17:58:20 imax kernel: registered device ppp0
Apr 25 17:58:20 imax pppd[372]: pppd 2.3.5 started by regalia, uid 500
Apr 25 17:58:21 imax chat[373]: abort on (BUSY)
Apr 25 17:58:21 imax chat[373]: abort on (NO CARRIER)
Apr 25 17:58:21 imax chat[373]: abort on (RING - NO ANSWER)
Apr 25 17:58:21 imax chat[373]: report (CARRIER)
Apr 25 17:58:21 imax chat[373]: report (CONNECT)
Apr 25 17:58:21 imax chat[373]: send (ATZ^M)
Apr 25 17:58:21 imax chat[373]: expect (OK)
Apr 25 17:58:21 imax chat[373]: ATZ^M^M
Apr 25 17:58:21 imax chat[373]: OK
Apr 25 17:58:21 imax chat[373]: -- got it
Apr 25 17:58:21 imax chat[373]: send (ATDT12345678^M)
Apr 25 17:58:21 imax chat[373]: expect (CONNECT)
Apr 25 17:58:21 imax chat[373]: ^M
Apr 25 17:58:52 imax chat[373]: ATDT12345678^M^M
Apr 25 17:58:52 imax chat[373]: CONNECT
Apr 25 17:58:52 imax chat[373]: -- got it
Apr 25 17:58:52 imax chat[373]: send (^M)
Apr 25 17:58:52 imax chat[373]: expect (ogin:)
Apr 25 17:58:52 imax chat[373]: 57600^M
Apr 25 17:58:59 imax chat[373]: TRANSPAC.UQKT2^M
Apr 25 17:58:59 imax chat[373]: ^M
Apr 25 17:58:59 imax chat[373]: ^M
Apr 25 17:58:59 imax chat[373]: Login:
Apr 25 17:58:59 imax chat[373]: -- got it
Apr 25 17:58:59 imax chat[373]: send (yourlogin)
Apr 25 17:58:59 imax chat[373]: expect (sword:)
Apr 25 17:58:59 imax chat[373]: yourlogin
Apr 25 17:58:59 imax chat[373]: Password:
Apr 25 17:58:59 imax chat[373]: -- got it
Apr 25 17:58:59 imax chat[373]: send (??????)
Apr 25 17:58:59 imax pppd[372]: Serial connection established.
Apr 25 17:59:00 imax pppd[372]: Using interface ppp0
Apr 25 17:59:00 imax pppd[372]: Connect: ppp0 <--> /dev/modem
Apr 25 17:59:01 imax pppd[372]: local IP address 164.138.102.121
Apr 25 17:59:01 imax pppd[372]: remote IP address 194.250.214.7

The final lines indicate that ppp has come up successfully.
Now you can use telnet, ftp, netscape, and so on.

To shut your connection down, type

[imax]$ pppdown

in which case the window running "tail -f /var/log/messages"
should spit out the following:

Apr 25 17:59:25 imax pppd[372]: Terminating on signal 2.
Apr 25 17:59:25 imax pppd[372]: Connection terminated.
Apr 25 17:59:25 imax pppd[372]: Exit.

That's it!

Final remark: ppp can of course be launched without executing "tail -f /var/log/messages"
as root; that step simply allows you to monitor the connection process, and/or detect any errors
during initial testing.