|
Linux Dial-up Configuration NB: The script has been tested on SuSE Linux 6.1 and that it is not guaranteed to work on all Linux distributions Before you start, check if you have PPP installed and what version is on the system, type rpm -q ppp . This will return something like this. ---snippy--- max:/usr/sbin # rpm -q ppp ppp-2.3.5-36 max:/usr/sbin ---snippy--- In order for your Linux box to connect, you need to make 2 scripts. one for dialup and one to hang up. 1.Dialup script: For this you need to go to the /usr/local/bin folder. In that folder make a file called dial. Now edit the file. Put the following in. ---snippy--- #!/bin/sh /usr/sbin/pppd /dev/modem 57600 connect \ '/usr/sbin/chat "" ATDT9153600 CONNECT' \ noipdefault defaultroute user [your username](your username being your ISP username, eg. username@global.net.mt) ---snippy--- Save the file. 2. Hang up script: In the same folder (/usr/local/bin) make another file called hangup. Edit the file and put the following in. ---snippy--- #!/bin/sh kill 'cat /var/run/ppp0.pid' ---snippy--- Save the file 3. PAP. Because we use PAP Authentication you have to put your password in a file that will issue your password to the authentication server. You can do this by going to the folder /etc/ppp/ In there you will find the file pap-secrets . Edit this file. I only copied the first part of this file for you. The rest isn't important. ---snippy--- # Secrets for authentication using PAP # client server secret IP addresses # OUTBOUND CONNECTIONS # Here you should add your user id password to connect to your providers via # PAP. The * means that the password is to be used for ANY host you connect # If you have different providers with different passwords then you better # remove the following line. username@global.net.mt * password ---snippy--- As you can see, you enter your username, followed by a * and then your password. That's all you need to do in this file. Save the file and exit. 4. DNS. In order to resolve DNS names to IPs we obviously need a DNS server. For this you have to go to the /etc/ folder. Look for the file called resolv.conf file. Now edit this file. Put the following 2 lines in. ---snippy--- search nameserver 194.105.32.2 ---snippy--- Save and exit. That's it! Now all you do is go to /usr/local/bin and run the dial script. If you want to see if all goes well you can open another console and type tail -f /var/log/messages . This is a log file that will show you what is happening. An easy way to disconnect without using the hang up script is to press Ctrl - C . It kills the dial script and disconnects the modem. HOME |