Tuesday, October 18, 2011

How to: disable wvdial Auto DNS -- use static DNS settings


Sometimes you wanted to get rid of your crappy ISP DNS servers for good.
I'm using wvdial to dial up, here's what I do.
Steps:
  • Disable usepeerdns. Edit "/etc/ppp/peers/wvdial" file. Commented the usepeerdns line. Here's what is should look:
    #usepeerdns
    
  • Disable Auto DNS in wvdial. Edit "/etc/wvdial.conf" file. Set Auto DNS Off.
    Auto DNS = Off
    
  • Add your own DNS servers to "/etc/resolv.conf" file. Eg.:
    nameserver 8.8.8.8
    nameserver 8.8.4.4
    

    Those are Google Public DNS service, a very good ones, and best of all, its free!
    More of free public resolving nameservers here.
    Google public DNS:
    8.8.8.8
    8.8.4.4
    Tiggee LLC
    208.94.147.150
    208.94.147.151
    Level3
    4.2.2.1
    4.2.2.2
    4.2.2.3
    4.2.2.4
    4.2.2.5
    4.2.2.6
    TelkomFlexi
    202.134.0.155
    203.130.212.217
    Open DNS (with parental control)
    208.67.222.222
    208.67.220.220
  • Edit "/etc/dhcp3/dhclient.conf". Find:
    prepend domain-name-servers 127.0.0.1;
    

    Add your nameserver to the line, ie:
    ...
    prepend domain-name-servers 8.8.8.8,8.8.4.4;
    ...
    
  • Done!