RedHat 7.2/7.3 Linux Settings

  


Procedures for RedHat Linux 7.2 or 7.3 users to access ClassNet (including Wireless LAN), ResNet or CUHKnet (via public ISP)

1. Check if your network card is running properly

2. Download a VPN Client, pptp-linux, from Internet
3. Install and Configure the Client pptp-linux
4. Connect to ClassNet/ResNet/CUHKnet
5. FAQ for ResNet Users

The following procedures assume that you are using RedHat 7.2/7.3. However, it should be applicable for other Linux Distribution such as Mandrake.


1. Check if your network card is running properly
1.
To check if you have installed a network card in RedHat:
  1. On KDE Desktop, click Start menu (the K icon in the lower left corner).
  2. Open Control Center.
  3. Select System -> KDE System Control.
  4. Choose the tab Device Manager.
  5. You should find your network card in Network Controllers.

2. If your network card is shown there, you may check whether your network configuration is correct:

  1. Select System -> Network Configuration from the Start menu.
  2. Click the tab Interfaces.
  3. Highlight the interface eth0, and click the Edit button.
  4. The IP and Netmask should be left blank,
    the option Activate interface at boot time should be checked,
    the item dhcp should be selected from the Interface configuration protocol.
  5. If your settings are different than above, you may change them. When finished, click the Done button and followed by the Save button twice.

2. Download a VPN Client, pptp-linux, from Internet

  1. You can then download a VPN client called pptp-linux (originally developed by C. Scott Ananian) from the URL below:

    http://prdownloads.sourceforge.net/pptpclient/pptp-linux-1.1.0-1.tar.gz

    Please note that you should be the root user to install and run this client.

  2. Assumed that you placed this file under the directory /usr/local/src/, issue the following command to decompress the file.

    tar zxvf pptp-linux-1.
    1.0-1.tar.gz
    cd pptp-linux-1.1.0-1
    tar zxvf pptp-linux-1.1.0.tar.gz

    All files will be extracted in the directory, /usr/local/src/pptp-linux-1.
    1
    .0-1/pptp-linux-1.1.0/.

3. Install and Configure the Client pptp-linux
  1. Change the directory to the source of "pptp-linux-1.1.0"

    cd /usr/local/src/pptp-linux-1.
    1.0-1/pptp-linux-1.1.0

  2. Enter the following command to re-compile the program:

    make clean
    make

    You will find a new executable pptp in this directory. You can copy this file to the directory, /usr/sbin, if you do not want to add a PATH for it.

  3. Change directory to /etc/ppp, and edit the file pap-secrets and add the following line with 3 items at the end of this file:

    s001234 vpn.classnet.cuhk.edu.hk your-cwem-password

    Input your computing ID as the first item and enter the following server name as the second item,
    - ClassNet users: vpn.classnet.cuhk.edu.hk
    -
    ResNet users: vpn.resnet.cuhk.edu.hk
    -
    CUHK Net users (via public ISP): vpn.cuhk.edu.hk

    Finally add your CWEM password as the last item and save the file.

  4. Edit the file, options, in the same directory and replace the content inside with the following lines:

    lock
    debug
    mtu 1000
    nobsdcomp
    nodeflate
    noaccomp
    nopcomp
    novj
    name s001234

    Note that you should replace the computing ID (e.g. s001234) in the last line with your computing ID.

  5. Finally, to avoid typing a long command each time you make VPN connection, you can create a script file called connect with the following content (all contents in one single line):

    pptp vpn.classnet.cuhk.edu.hk debug name s001234 remotename vpn.classnet.cuhk.edu.hk noipdefault

    You also need to
    - Replace s001234 with your computing ID
    - Replace vpn.classnet.cuhk.edu.hk with vpn.resnet.cuhk.edu.hk (ResNet users) or vpn.cuhk.edu.hk (broadband users connected through ISP)

    After save the file, issue the command to make it executable,
    chmod u+x connect


    The installation and configuration has been complete and you are ready to make connection.

4. Connect ClassNet/ResNet/CUHKnet

Now you can make connection to the ClassNet/ResNet/CUHKnet.

Step 1
Open a Terminal window and enter the command below to make the connection.

./connect

There should be no error message if the connection was made successfully.

Step 2
Issue the command, ifconfig -a. You should be able to see three interfaces there, namely eth0, lo and ppp0.

Read the
first IP address (Inet Address) (137.189.xxx.yyy) on the left under the ppp0 interface . Note that this address will change each time you connected, and this address should be 137.189.x.y, whereas x,y are number ranging from 1-255.

Step 3
The next step is to add your gateway address. For example, if you got the gateway address like 137.189.247.11, you may Issue the following command to link to your gateway.

route add default gw 137.189.247.11


Replace the IP address with the gateway address you obtained.

At this moment, you can make connection to Internet

======================

To disconnect from the network, you may issue the following command:

kill -9 <the process id of pppd>

For example, if the process id for pppd is 1026, the command to enter is kill -9 1026.

Note: to find out the process id for pppd, you can issue the command ps -ef | grep pppd
            
 

     

     

 

 Need Help?
 Please send your requests/ problems
 to http://helpdesk.itsc.cuhk.edu.hk or datacom-help@cuhk.edu.hk
 Copyright 2000 Information Technology Services Centre,
 The Chinese University of Hong Kong.