installs

BSNL DIAS/GNU Linux Router Setup

This is my previous setup, for documentation. I have now moved to BSNL DataOne. Check my BSNL DataOne documentation.

Phase I: Setup the GNU/Linux System (Knoppix 3.6 installed to hard disk)

System specification: Intel x86 (9 years old), 500 MHz, 128 MB RAM, 40 GB HDD, DAX Ethernet cards (two, Rs.300/- each).

BSNL DIAS modem RJ-11 telephone port, RJ-45 ethernet port.

Dias Image I    Dias Image 2     BSNL DIAS 3   

I inserted the Knoppix 3.6 CD and changed the BIOS to boot from the CD. On boot, my hardware was detected. I opened a terminal and started the installation:

# knoppix-installer

Created partitions, formatted them and continued to install Knoppix 3.6 to hard disk. Installation was smooth. By default, iptables support is installed in the kernel. Knoppix 3.6 installs lilo to hard disk. The DAX ethernet drivers used are 8139too.

Phase II: Connect to ISP

I downloaded the rp-pppoe package (rp-pppoe-3.5.tar.gz) from:

http://www.roaringpenguin.com/penguin/open_source_rp-pppoe.php

Extracted the same and entered the directory.

# tar xzvf rp-pppoe-3.5.tar.gz
# cd rp-pppoe

Ran the "go-gui" script to install rp-pppoe.

# ./go-gui

You can also run the "go" script. This installs adsl-setup, adsl-start, adsl-stop utilities. I ran adsl-setup to setup the username, password, interfaces (using eth0 to connect to the BSNL DIAS modem). A cross-overcable connects the BSNL modem ethernet port to the system's eth0ethernet port.

# adsl-setup

I connect using:

# adsl-start eth0 <username> ... connected!

Now the GNU/Linux desktop is connected to the Internet.

Phase III: LAN setup

I bought a 8-port Compex switch from Ritchie street, costed me Rs.1350/-. The eth1 ethernet port is connected to the Compex switch using a crossover ethernet cable. All systems that connect to the switch need to use a crossover cable.

I use the following script to setup NAT and IP forwarding on the GNU/Linux router system:

#!/bin/bash
iptables --flush -t nat
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo "1" > /proc/sys/net/ipv4/ip_forward

I run the script and my iptables and related modules are loaded, as seen from the output of lsmod.

I then set the IP address of eth1 (manually) to 10.0.0.254. We now have the LAN setup.

Phase IV: Configuring clients

I connect my IBM Thinkpad T41 laptop to one of the switch ports and configure my ethernet (eth1) as follows:

# ifconfig eth1 10.0.0.25 up
# route add default gw 10.0.0.254 eth1

My /etc/resolv.conf contains the nameservers of BSNL domain nameservers (DNS). I can use the Internet from my laptop as well as my GNU/Linux router desktop.

I have automated the adsl-start sequence so that on power-up (both themodem and the GNU/Linux router), I get connected automatically to the Internet.