20 May, 2011

Setting up local dns cache and public dns address for "lightning" speed browsing in Ubuntu


When it comes to internet, reasonable speed is always an uncomprimisable thing. That may be a crucial reason for making you sit infront of your machines for hours and days. So the lightning speed can be achieved with your ubuntu box in two ways. They are 
  • Use faster and free domain name servers like google's pubic dns or OpenDNS (first throw the one provided by your service provider). Hope you will check one of my past article written in Crack Bytez.

  • Maintain a local dns cache in your machine itself.  So that you can do a good amount of address resolution for frequently used websites within your machine itself, and that saves a reasonable amount of time.

Here i am planning to bring both of these techniques together in a simple manner. Though there are many applications for local DNS caching in ubuntu [ such as dnsmasq, pdnsd, bind9 ] are available, bind9 seems to be a good option for me...

Starting with BIND9  DNS server in Ubuntu

Bind9 (Berkly Internet Naming Daemon)  is the most widely deployed DNS server. Bind9 is available in the ubuntu main repository itself. So you don't need to add some additional repository for installing it. Use the following command line or search for 'bind9' in Synaptic package manager to install it. 

$ sudo apt-get install bind9

Bind9 allows different type of configurations, and our point of view is on configuring it as a caching server. In this configuration BIND9 will find the answer to name queries and remember the answer for the next query. This can be useful for a slow internet connections especially based on mobile internet. By caching DNS queries, you will reduce bandwidth and (more importantly) latency. It increase network performance by caching IP addresses of commonly visited websites instead of retrieving them from the public DNS servers maintained by ISPs at each request.

Configuring the BIND server 

#  First you have to set your machine's address (127.0.0.1) itself as the primary dns address.  This can be done with the help of Network manager or by editing the /etc/resolv.conf file in your ubuntu box. Check the screenshot below..

  • using Network manager:: select the connection and click on the edit. Then choose the IPv4 settings tab and add 127.0.0.1 to the DNS servers field.

  • editing the resolv.conf file:: If you are using DHCP then you may have to edit the resolv.conf file every time you connect to the internet to make bind work properly.



Now change the bind configuration file to add some external DNS servers for resolving a new address that is not cached on your local cache at that time. If you are not adding an external dns server, then it will not be possible to resolve a new address request comes from the browser.  Here i recommend google's public dns or OpenDNS addresses to add in the BIND configuration file. This servers may be sometimes faster and reliable than your ISP's Domain Name Servers. You can find the best DNS server applicable for you by checking in this post. Here is how i have added it

#  First open the file 'named.conf.options

$ sudo gedit /etc/bind/named.conf.options

#  Now uncommend the section 'forwarders'. Replace the '0.0.0.0' with the dns server address applicable to you (Check the figure).

#  Restart  the BIND server:

$ sudo /etc/init.d/bind9 restart

 

Thatz it. We are almost done. Now use the dig command to see the change in speed. If you "dig" a domain name multiple times you should see a drastic decrease in query time: between the first and second query. This is due to the server caching the query. See what happened when i dig twitter from my terminal three times concecutively. See the change in the Query time.

$ dig twitter.com

                                                        

Time is up. Go Applications > Internet > firefox and experience the lightning speed...

Read rest of entry

28 April, 2011

Tata docomo internet in ubuntu

Tata docomo offers basically 3 kinds of gprs based internet plans for use in Kerala. They are providing reasonable browsing speeds but still Idea is faster among other counter parts.

Connect your mobile phone using the data cable or bluetooth to the Ubuntu box. If you are using datacable then opt for the 'phone mode' ('Nokia mode' in Nokia phones) from the popup menu shown in the phone when connected to the pc. The network manager will launch the new broadband wizard in the pc automatically. You can manually access this by clicking on the 'Add' button under the 'Mobile Broadband' tag in the NetworkManger.

During the wizard you can find TATA DOCOMO listed under Mobile Service providers belonging to India. This case is true for versions of Ubuntu released after Ubuntu 9.10. For older versions of Ubuntu TATA DOCOMO might not be listed. In this case you can select any of the service provider (idea, airtel...) and editing it after completing the wizard. For editing the connection, select the 'edit' button under the 'Mobile Broadband' tag in the NetworkManager. You have to change the feilds such as Access Point, Number, DNS servers etc... with new values as follows.

Connection name    :     tata docomo
APN                         :     TATA.DOCOMO.INTERNET
Number                   :     *99#
DNS server             :     8.8.8.8



To change the DNS server, first click on the 'IPv4 Settings' tab and select the 'Method' as 'Automatic (PPP) addresses only'. Then fill the 'DNS servers' feild with the above given value. Check in the box corresponding to 'Connect automatically' and click on the apply button to finish the configurations.



Connection using the Bluetooth:

If you are using past versions of ubuntu till maverick Meerkat (10.04 LTS) then you may have to install an application called blueman for using mobile internet without any hazzles and terminal based configurations. Blueman provides a simple interface for accessing the mobile internet via bluetooth. Installation procedures have been discussed in another post in  crack bytezz. Click on the 'setup' button and then select 'Dialup Networking' in the 'connect to' window popped up and forward to finish the procedure. The connection can be setted up as specified above



Dialling the connection

Now dial the connection from the Network Manager applet in the taskbar as shown in the figure.



Read rest of entry

22 April, 2011

How to change dns address in Windows

 The domain name servers plays a big role in the case of world wide web. It converts the human understandable URLs or host names such as google.com or yahoo.com into machine understandable IP addresses. It is very important to select the best DNS server from a list of available ones since the right selection will reflect in the browsing speeds. Actually when an internet user types some url and hit the enter key, the  role of dns server (usually provided by the correspponding internet service provider for example bsnl or vodafone ) comes into effect. 

The dns server converts the hostname to the corresponding IP address and returns the IP back to the browser.Usually the dns server uses tables to store the hostname and ip, also a domain naming system is also implemented as a distributed system. 

Leave the theories ... lets findout the best dns server that suits you and change the your default dns value to the best one that is more fast and reliable using the following steps...

Before that, the public and free dns address available are 

google public dns
8.8.8.8
8.8.4.4
opendns
208.67.220.220
208.67.222.222

dns advantage

156.154.70.1
156.154.71.1

others
209.244.0.3
209.244.0.4





1. Use the ping command to find the dns server with less average RTT (round trip time).

Take the command prompt and use the average value of round trip time in the ping command to spot the best dns address. Check the figure.

  > ping <dns address here>

  

2. Replace the default dns address with the new one



Take 'Network and Sharing Center' from the control panel. Select the 'Manage Network Connections' from the left side panel. Select the connection and right click to select the 'Properties' from the menu.


Select the TCP/IPv4 under the Networking tab and click the 'properties' button to change its properties. 


Inside the TCP/IPv4 properties click on the 'Use following DNS server' and add the DNS server address there as shown in the image below.

If the connection is already active you may have to restart the connection to make the changes take into effect. 




That's all about the configuration. From my personal experience google's public dns addresses are fast and reliable than the others. Almost a lion's share of time i spend on internet is usually with google related sites such as google search engine, analytics, blogger... The method for changing the dns address in Ubuntu linux is explained in the post linked here
Read rest of entry

23 April, 2010

How to connect Airtel GPRS in Ubuntu linux

The gprs internet is a good option when you are looking for an affordable internet connection and limited budget...

You dont need to think about the wires... (coz it probably makes you weired). Here check out how airtel's gprs can be accessed in your desktop or laptop


Follow the steps to connect.


1. Connect the phone using the data cable to the computer. Choose the COM port
    mode or phone mode in your phone. In Nokia it is called 'nokia mode'


2. On selecting the phone mode the 'New Mobile Broadband wizard begins 
    automatically. If the wizard does not pops up automatically, right click on the
    network manager icon on the top of the task bar. Then choose edit connection. 
    Click on the add button. The window will appear as follows..


       


3. Select the Airtel from the list.






4. Write click on the network manager icon on the top bar and slect the 'edit 
    connections'. Select the 'Mobile Internet' tab and click on the edit button
    after selecting the Airtel from the list.




5. On the IPv4 settings tab change the dns entry as follows...
  
        DNS : 8.8.8.8,8.8.4.4


    These are public dns addresses by google and may give better performance in
    case of of speed.






6. Click on the network manager icon on the top panel and select Aircel to dial 
    the connection.


Repeat the step 6 whenever you need to connect using the same connection, after connecting the mobile phone/usb modem to the system....
Read rest of entry

How to connect Aircel GPRS in Ubuntu Linux

Older versions of the Ubuntu linux has very less support for USB modems. This was the major problem that prevents you from connecting the mobile broadband internet facility provided by means of gprs.Linux versions were back in automatically detecting the USB modems in the mobile phones… But the new 9.04 version of Ubuntu linux (some previous versions also ) comes up with many facilities to overcome this problems…

Let me get into the matter… Here i am sharing my experiences when i tried to connect Aircel gprs using my Nokia 5200… the following procedures may be applicable to almost all java based phones.

Inorder to connect aircel gprs in your computer, first connect your phone to the computer through the data cable and select the nokia mode. Then the Network manager in Ubuntu will automatically detect the presence of phone. It will automatically starts a Mobile broadband configuration wizard…

Go through the pictures to get the step by step procedure..



One of the problems that I faced while the connection process is the list of mobile broadband ISPs provided did not contain Aircel. No problem!!! select the Airtel from the list, so that u can edit the connection later. Also the number that we have to dial in Aircel and Airtel are almost the same.


After the wizard completes right click on the network manager icon on the top panel and perform as shown in the pictures below..

Select the ‘edit connections'



Choose the Mobile broadband tab and select the ‘Airtel’ and click on the edit button



Change the following ….

Connection name : Aircel

Number : *99#

APN  : aircelgprs      (in lower case)

Leave the remaining spaces untouched and click ‘apply’

Click on the IPv4 Settings tab and enter the value in the DNS field as in figure.

      8.8.8.8, 8.8.4.4  

Each are primary and secondary dns addresses respectively seperated by the a comma. Please  remember we have started from configuration of airtel. So the dns addresses are also belonging to airtel. Here in this step we replace this with google's  public dns. Read more about dns on 
http://1024bitez.blogspot.com/2010/04/something-about-domain-name-servers.html



 
Click on the network manager icon on the top panel and select Aircel to dial the connection.


Then the icon of the Network manager will show that the connection is active soon. If you put your mouse over the icon u get a pop up  ” Mobile broadband connection ‘Aircel’ active”


That's all about the connecting Aircel in the Ubuntu linux, enjoy the power of mobile internet.

Read rest of entry
 

Terminal Diary | techblog Copyright © 2009 Gadget Blog is Designed by jintu jacob Powered by Blogger