You are on page 1of 2

November 08, 2004

Connecting to BSNL dial-up Internet Server using wvdial


Bharat Sanchar Nigam Limited (BSNL) is India's largest telecom company. It is owned by the
Govt. of India. BSNL provides Internet dial-up access packages (Sancharnet) which are the best
deal when compared to those provided by other ISPs in the country. Here I will explain how to dial
in to the BSNL server in linux using wvdial utility. It is assumed that you already have a BSNL dial-
up internet account. If not then get one and come back to this page :) .
If this is the first time you are connecting to the internet, then you have to 'su' to root and execute
the command :

$ su -
# wvdialconf

wvdialconf script, builds a configuration file for wvdial. It detects your modem, its maximum baud
rate, and a good initialization string and generates or updates the wvdial configuration file based
on this information.Now if you check the /etc/wvdial.conf file, you will see that wvdialconf has
written the necessary data regarding your modem there. Now you have to open the
/etc/wvdial.conf file and enter the BSNL dial-up access phone number, your username and
password as follows:

; /etc/wvdial.conf file
Phone = 172222
Username = "your login name"
Password = "your password"

Also make sure that the line -

New PPPD = yes

exists in the /etc/wvdial.conf file in the [Dialer Defaults] section. If it is not there, then include that
too.
Next you have to modify your /etc/resolv.conf file and enter the primary and secondary DNS
servers of BSNL for name resolution. If you do not do this then, you will be able to login to the
BSNL server, but will not be able to browse the web. My /etc/resolv.conf file is as follows:

nameserver 61.1.96.65 #Primary BSNL DNS Server


nameserver 61.1.128.5 #Secondary BSNL DNS server
nameserver 61.0.0.5 # Tertiary BSNL DNS server

Now to connect to the internet, just run wvdial command in the console as follows:

# wvdial

By default only root can run wvdial. To let other users execute wvdial utility, I did the following:
First I created a group called 'modem'.

# groupadd -g 503 modem

I Made sure that the group id 503 is not used by any other group; If not then you could use any
other unique number greater than 500.Then I included all users who are allowed to connect to the
internet to this newly created group.

# usermod -G modem ravi


# usermod -G modem sada
Then I permitted the modem group to connect to the internet by editing the sudo configuration file
/etc/sudoers as follows:

# visudo

//Now you are in /etc/sudoers file


%modem localhost=/usr/bin/wvdial

From here onwards, those who are in the modem group can execute the following command to
connect to the internet.

$ sudo wvdial
password: ******

My complete /etc/wvdial.conf file is as follows:

[Dialer Defaults]
New PPPD = yes ;Don't forget to include this line
Modem = /dev/modem
Baud = 14000 ;I use the linuxant driver so speed is less
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem

;BSNL phone no:,username and password settings


Phone = 172222
Username = "My login name"
Password = "My Password"

AddThis Social Bookmark Button