s i s t e m a o p e r a c i o n a l m a g n u x l i n u x | ~/ · documentação · suporte · sobre |
Next
Previous
Contents
2. How do I connect to the rest of the world?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.
2.1 The basic configurationConfiguration of the machine for use on the net should be done as
user
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.
If you want to be able to use names like
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.
Likewise, a minimum /etc/networks is:
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
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 ATZ modem 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
ppp when 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:
or
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:
See also 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:
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.
Next Previous Contents |