It will be assumed that we have installed the essential networking software modules from your Linux distribution, and that you have set up which serial port that is to be used for the /dev/modem.
The default configuration will usually only allow direct access
to /dev/modem as user
To connect to ISP shell accounts directly, and to experiment with connection sequences, you may use the minicom program. It is pretty straight forward to use.
Configuration of the machine for use on the net should be done as
root. Before proceeding any further, ensure that
/etc/hosts.deny contains the following line:
You would normally want to allow yourself, so add the following line to /etc/hosts.allow:
Or if you insist:
For the following, note that it is meant for those connected via PPP and with a dynamic IP address. If you have the benefit of a fixed connection, there will be some differences.
It is nice to have a name connected to the machine, a name that the dynamic IP user really can select as he or she pleases. Put the name in /etc/HOSTNAME:
The next step is to set up the name server in /etc/resolv.conf:
The name server must be specified by a numeric IP address, and will be different from ISP to ISP. If required, you can have up to three different servers, each on a separate line. They will be requested in the sequence in which they are listed.
search . nameserver 184.108.40.206 <nidx>nameserver
If you want to be able to use names like
an abbreviation for
somemachine.acme.xz, you must
replace the first line with:
A certain minimum of configuration will also be required in /etc/hosts. Most users will be able to manage with:
Those with a fixed IP-address will obviously replace 0.0.0.0 with that.
127.0.0.1 localhost 0.0.0.0 roderick
Likewise, a minimum /etc/networks is:
loopback 127.0.0.0 localnet 0.0.0.0
You should also set your external mail domain in /etc/mailname:
The username and password at the ISP must be specified in /etc/ppp/pap-secrets
dirk * PrettySecret
For those ISPs using CHAP instead of PAP the filename is /etc/ppp/chap-secrets.
Finally, the nitty gritty regarding the connection procedure itself must be specified before PPP can be initiated. This is done in /etc/ppp/chatscript:
Details here may have to be tuned somewhat. The phone number in the third line must of course be set as required. Some users may need to replace the
TIMEOUT 5 "" ATZ OK ATDT12345678 ABORT "NO CARRIER" ABORT BUSY ABORT "NO DIALTONE" ABORT WAITING TIMEOUT 45 CONNECT "" TIMEOUT 5 "name:" ppp
ATZmodem initialization string with something more tailored for the modem being used. The last line specifies that one is expecting a prompt that ends with
name:, and that the response should be
pppwhen it arrives. Other systems may have other login procedures.
To actually initiate a call, the PPP protocol may be initiated by issuing the following command:
We should now be on-air, and stay up until the program is killed by typing a ctrl-C. Any messages concerning the connection will be appended to the system logs. To read them, try:
exec pppd connect \ 'chat -v -f /etc/ppp/chatscript' \ -detach crtscts modem defaultroute \ user dirk \ /dev/modem 38400
As long as PPP is up, you will have direct access to the Internet and may use programs like ftp, ncftp, rlogin, telnet, finger etc. All these programs should be part of the network package.
Further information concerning PPP is also available from:
Finally, an additional word about security The file /etc/inetd.conf lists all services that your machine will offer externally. With the /etc/hosts.deny file we have made, no external access will be allowed. For those who need it, access must be allowed explicitly in /etc/hosts.allow. Local traffic may be allowed by:
man 5 hosts_access.
A final minor issue: A certain confusion exists regarding the names of the POP protocols. A definition in /etc/services compatible with just about everything is:
pop2 109/tcp pop-2 # PostOffice V.2 pop3 110/tcp pop-3 pop # PostOffice V.3
ALT: Instead of chatscript, one might use the much more flexible dip. But not in connection with diald.
ALT: Those fortunate enough to have a permanent TCP/IP connection via e.g. an Ethernet may safely ignore anything about PPP and rather start concentrating about setting up their network card.
ALT: Others may not have the possibility of using PPP, but may be able to use SLIP instead, for which there is support in much the same manner as for PPP. Another possibility is UUCP Others again may have to rely on exchange of news and email be means of SOUP A description for the latter case may be found in:
The TERM program is also an option. Refer to the Term-HOWTO.