Thursday, 23 September 2010

Connecting to BSNL on linux

I have used BSNL broadband connection for some years now and have connected to the internet through BSNL on various linux distributions like Arch, Gentoo, openSUSE and Debian. I shall share the procedure for the same here. However, before the procedure I would like mention some basics.


  • Basic information
BSNL uses point to point protocol over ethernet (pppoe). So, your kernel should have it enabled. If you want to share your connection through another ethernet port or wifi; then you might be interested in bridging options too. DNS information is obtained from BSNL; you do not have to set it.
  • openSUSE

The easiest of them all is getting it done in openSUSE. The package needed is kinternet; so ensure that you have it installed during initial setup [It is not selected by default in the installer]. In YaST, configure the ethernet interface, which most likely would be eth0. Use static address 192.168.1.2 and subnet mask 255.255.255.0. Configure the gateway 192.168.1.1. The DNS is obtained from the ISP. Clicking the kinternet icon in the tray should get you connected.
  • Gentoo

Gentoo lets users configure their kernels. Make sure your kernel meets the requirements mentioned in the Basics section. I prefer using Roaring Penguin PPPoE scripts. Install them during your installation. To configure before first use, issue the following command as root.
pppoe-setup
Provide you username and password when asked. Enter 'server' when asked for DNS servers. The defaults should do for the rest. Edit /etc/rc.conf to configure the ethernet interface as follows:


eth0="eth0 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255"


INTERFACES=(eth0)


To start and stop the connection, use the commands pppoe-start and pppoe-stop. In case, you can connect yet can't view web pages then set the obtained IP address for the pppoe interface as your DNS server. You may also need to specify the default gateway in rc.conf as 192.168.1.1.
  • Debian

Debian also uses Roaring Penguin scripts. Configure as mentioned for Gentoo and Debian shall connect automatically.
  • Arch

Arch uses the same scripts. However, you will have to issue the commands as in Gentoo.

Saturday, 11 September 2010

BSNL DNS server poisoned

BSNL is one of the largest telephone and internet service providers in India; yet its negligence often tests your patience. Recently, two of BSNL's DNS servers
  • 61.1.96.69
  • 61.1.96.71
were poisoned. I found it out when whatever I entered in my URL bar took me to the same site. I checked up with nslookup to find out that all my DNS queries yielded the same result. The very next morning I thought I should report it to the authorities so that they can mend it soon. However, when I called them instead of listening to what I had to say the officer shouted me and told me to ring some other department [which I didn't care to remember]. This was too much for me to take. We had a rather loud talk and I decided to let the parasite rot in the bureaucratic dirt he has lived so far in.

I changed my DNS server to Google Public DNS and my problem was solved. As for other users, we if they cared about it, then the officer would have had enough complaints that he would have welcomed the information, I was willing to share. However, now BSNL has changed the DNS servers to
  • 218.248.240.79(ns2.bsnl.in)
  • 218.248.240.208 (ns3.bsnl.in) and
  • 218.248.240.24 (ns5.bsnl.in)

Freenode's web interface introduces captcha

Tuesday, 31 August 2010

Saturday, 21 August 2010

Meta-Choice


We should consider the meta-choice.

Online image editting

Recently, I had to do some image editing for my friend's blog. I did not have Gimp installed on my Arch system and Gwenview can do some cropping but not much else. Some time ago, I was thinking of having a site that allows editing of images online. It was just a random thought and I did not have the knowledge to implement such a site. However, now that there was a need for such a site [because I did not want to install image editing tools as do it very rarely], I googled for it and found this nice site to help me out. It had a Photoshop-like UI and worked nicely for my needs. I was glad to get my work done [and to know that my idea was feasible].

John Cleese on creativity and subconscious

Sunday, 15 August 2010

Connecting to BSNL GPRS on Arch linux

Popular Indian ISP BSNL is notorious for bad customer care. This makes the use of less popular technologies quite an experiment. Cutting out the elaboration of my experiments, let us look at the procedure for connecting to the internet using BSNL GRS. I used wvdial for the purpose and find it quite flexible. Internet access requires the cell phone to be connected in "PC Suite" mode. I shall describe the procedure for two phones:
1. Nokia XpressMusic 5130
2. Samsung Corby

Lets start with Nokia XpressMusic. To connect it from Windows, use Nokia's PcSuite; and add the following configurations manually:
1. access point name: bsnlnet
2. dialing number: *99#


Now let us look into connecting Nokia XpressMusic using linux. Firstly, get wvdial and its dependencies installed on your system. Connect the phone and check dmesg output to get the name of the modem device. Run wvdialconf to set the baud in /etc/wvdial.conf. Then edit /etc/wvdial.conf as follows:

Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","bsnlnet"
Password = <your phone number>
Check Def Route = 1
Phone = *99***1#
New PPPD = 1
Modem Type = USB Modem
Stupid Mode = 1
# let wvdialconf set this for you
Baud = 460800
Auto DNS = 1
# This command is essential.
Dial Command = ATD
#  put your modem name here
Modem = /dev/ttyACM0
ISDN = 0
Username = <your phone number>


The same configuration shall work for the Samsung Corby. Finally, to connect Samsung Corby using the PcSuite, use the following configuration.
1. access point: bsnlnet
2. dialing number: *99***1#