How do I configure Redhat 5.x for Internet Access?

There are two basic methods of configuring Internet Access for RH 5.x.  The method in which some may find more useful may be by using the control-panel under X.   You can find information regarding such usage from the Red Hat Linux User Guide.  You can find this document at Red Hat's  homepage under Support.   Alternatively, you can find a softcopy of this manual in /doc/rhmanual/manual in your Instalation CD.

This document assumes that you have already got PPP compiled into your kernel.  To the unitiated, don't worry, if you have installed just installed Redhat Linux, PPP should be in your kernel.



What we will detail here will be more of a command-line approach.  It is functional and straightforward and should be rather easy for newbies.  The main configuration files for the configuration of Internet Access for RH 5.x can be found in the following directories:-

/etc
/etc/ppp

If /etc/ppp does not exist, create it there.  Download the following files and copy them into /etc/ppp:-

jaring - for jaring access
jaring-dialer - for jaring access
tmnet - for tmnet, putranet access
tmnet-dialer -for tmnet, putranet access
ppp-off - to terminte the connection, irrespective of ISP

After that, follow these steps:-

[root@localhost /]# cd /etc/ppp
[root@localhost /]# chmod 777 ppp*
[root@localhost /]# chmod u+s /usr/sbin/pppd

Edit the tmnet/jaring script using vi or some other editor (most newbies prefer to work with an editor called "pico").  The script should appear as follows:-

#!/bin/sh
#
# Script to initiate a ppp connection. This is the first part of the
# pair of scripts. This is not a secure pair of scripts as the codes
# are visible with the 'ps' command.  However, it is simple.
#
# These are the parameters. Change as needed.
TELEPHONE=1511 (the number listed here is the Jaring access number, if you are using TMNet or some other ISP, please change the number accordingly)
ACCOUNT=yourlogin (type your login in place of yourlogin
PASSWORD=yourpassword (type your password in place of yourpassword)
LOCAL_IP=0.0.0.0
REMOTE_IP=0.0.0.0
NETMASK=255.255.255.0   # The proper netmask if needed

Once you are finished with the modifications necessary, save the file.

You will next have to change the accessibility of these files by issuing the command:-

[root@localhost /]# cd /etc/ppp
[root@localhost /etc/ppp]# chmod 777 jaring*
[root@localhost /etc/ppp]# chmod 777 tmnet*
[root@localhost /etc/ppp]# chmod 777 ppp-off*

Create a link to your sbin directory so that you can issue the commands from anywhere.

[root@localhost /etc/ppp]# ln -s /etc/ppp/jaring /sbin/jaring
[root@localhost /etc/ppp]# ln -s /etc/ppp/tmnet /sbin/tmnet
[root@localhost /etc/ppp]# ln -s /etc/ppp/ppp-off /sbin/ppp-off

In order for your serial port to access higher speeds than 38400, there are a number of things you have to do.  First, change directory to /etc/rc.d and edit the file rc.local.  Add the following line to the end of the file:-
 
setserial /dev/cua0 spd_vhi
setserial /dev/cua1 spd_vhi
setserial /dev/cua2 spd_vhi
setserial /dev/cua3 spd_vhi

Next change the settings in /etc/snmpd.conf , found at the end of the file:-

interface:      ppp*    23      115200
interface:      ippp*   20      230400

Lastly <phew>, go to the /etc directory and edit the file resolv.conf.  Add the following line.  The IP listed is for Jaring.  For TMNet, please use the corresponding 202.188.0.133  You can list more than one number in here.

nameserver 161.142.2.17
 
Save the file and if possible reboot your system.

In order for you to access your ISP, all you need to do is to type

[root@localhost /]# jaring

or

[root@localhost /]# tmnet
 
To shut down the link, type

[root@localhost /etc/ppp]# ppp-off
 

If you wish to check the status of the line, type

[root@localhost /etc/ppp]# ifconfig
 
You should have a listing somewhat akin to the following, though not exactly.  ppp0 should be listed.  If not, it means your line is not up.  Note that you can also monitor the goings-on by issuing tail -f /var/log/messages on another virtual screen.

  lo        Link encap:Local Loopback
            inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
            UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
            RX packets:2250 errors:0 dropped:0 overruns:0
            TX packets:2250 errors:0 dropped:0 overruns:0

  ppp0      Link encap:Point-to-Point Protocol
            inet addr:161.142.115.85  P-t-P:161.142.115.4  Mask:255.255.255.0
            UP POINTOPOINT RUNNING  MTU:1500  Metric:1
            RX packets:23724 errors:0 dropped:0 overruns:0
            TX packets:25099 errors:0 dropped:0 overruns:0