Name Servers - Dnsmasq

free web hosting
Free Web Hosting > Computers & Tech > Networking

Name Servers - Dnsmasq

dserban
In Linux, BIND is the most widely used DNS server package.
However, most people who are just starting out tend find it very difficult to deal with BIND's many options.

There is another package that few people have heard of, called dnsmasq - it's a nifty super-lightweight name server, which is very easy to configure.

But first of all, let me explain what a name server is: it's a machine that holds a database against which it's performing look-ups in order to translate host names to IP addresses. In DNS jargon, this process of translation is called "resolving".

For instance, when you type www.google.com in the address bar of your browser, your request is mapped against a list of known IP addresses for servers, and the name server returns the actual number for www.google.com - that, in a nutshell, is what a name server does.

In order to better understand the concept, please do the following experiment with me - open a command prompt and type:
CODE
nslookup www.google.com

The result should look like this:
CODE
# nslookup www.google.com
Server: dns-cache-2.<name-of-your-ISP>
Address: <IP-address-of-some-DNS-server-at-your-ISP>

Non-authoritative answer:
Name: www.l.google.com
Addresses: 209.85.129.147, 209.85.129.99, 209.85.129.104
Aliases: www.google.com

#

nslookup is this cool little network troubleshooting utility which is embedded in most operating systems nowadays, regardless whether Linux or Windows.
nslookup also works the other way around - grab one of the IP addresses from the above output and type this at the command prompt:
CODE
nslookup 209.85.129.104

The result should look like this:
CODE
# nslookup 209.85.129.104
Server: dns-cache-2.<name-of-your-ISP>
Address: <IP-address-of-some-DNS-server-at-your-ISP>

Name: fk-in-f104.google.com
Address: 209.85.129.104

#

One of the reasons why it's interesting to run a DNS server at home is that these host-name-IP-address pairs can be cached in order to enable faster lookups - the first time you go out to www.google.com, it has to go out there and resolve that against the IP address, but then your domestic DNS server can "save that result", and so the next computer on your home network that asks for www.google.com will find a copy of the IP address right there, handy, and so it's much quicker, so your general web experience is smoother and faster.

You can also couple this with a DHCP server, which is a server piece of software that hands out IP addresses to clients as they connect. This function may or may not be built into the firmware of your home router - most modern routers provide it.

I am not going to explain how to download and install dnsmasq, just google it - the process should be pretty straightforward.
More information about the configuration can be found here:
http://www.enterprisenetworkingplanet.com/...cle.php/3377351

The main configuration file is /etc/dnsmasq.conf and the script to start / stop the server is /etc/init.d/dnsmasq.
The configuration file is very well commented, it really explains exactly what every single line does, so I would highly recommend going through it and really reading it.

In this context, let me first describe a very important configuration file that exists in every Linux system:
/etc/resolv.conf
This is normally where the IP addresses of your name servers are held, and one of these IP addresses will be picked by nslookup when you invoke it like I described above, it is <IP-address-of-some-DNS-server-at-your-ISP> in this case.
On the Linux server where you install dnsmasq, this file needs to contain the IP addresses that your ISP has provided to you - the real ones, so to speak.
But on all other Linux machines on your network, which act as DNS clients, this file needs to contain the IP address of the newly installed dnsmasq server on your own local network.

As you can see in the article that I linked to above, you need to prepend the string "nameserver " to every IP address which you maintain in any /etc/resolv.conf file.

As a side note, you can actually see in the system logs that, when a client requests a DNS lookup, the dnsmasq server is picking up that request and passing it along on behalf of the client.

There are a couple of other things which you can do with dnsmasq, for instance you can redirect particular "offending" domain names of advertising companies to a local IP address (127.0.0.1 localhost) in order to defeat ads. I remember from a while ago seeing that this was the topic of another discussion on astahost, but the solution was to change the hosts file on every computer on your network as opposed to doing it once for everybody.

One other thing you can do is foil SiteFinder type abusive practices. Read the article I linked above for more information on Sitefinder.

 

 

 


Reply

Sten
so does this let u make ur own dns server?
i was told theres only like 15 in the world.

Reply

Jimmy89
sten, most networks have their own DNS lookup system. There are only 13 'root servers' in the world, that are scattered around the world (with the majority in the USA). They are named a.root-servers.net through to m.root-servers.net and mostly have IP addresses starting with 192.*** (though some have 202 and 128) These would be used if you don't have a local DNS server (or one thats closer then a world server)

My Broadband Modem has a built in DNS Server (and from memory, so does the wireless router). So there is no real need to install other dns software onto the computer if the modem is going to do it for me!

You can tell where the DNS server is on your network by the first two lines that come up when you enter a nslookup command.
CODE
Server: dns-cache-2.<name-of-your-ISP>
Address: <IP-address-of-some-DNS-server-at-your-ISP>

if the server is a local name, or the address is a private ip address, then the DNS server that you are using is a local one.

Still the program is a nice simple one to use (I installed it after reading this article!) and i recommend it to anyone that wants to have their own DNS lookup service!

 

 

 


Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

Recent Queries:-
  1. why does my pc connect to root-servers? - 113.99 hr back. (1)
  2. dnsmasq nameserver - 423.03 hr back. (1)
  3. dnsmasq cpanel - 547.91 hr back. (1)
Similar Topics

Keywords : servers, dnsmasq

  1. Private Servers Question
    (13)
  2. Name Server
    what are the name servers? (6)
    Hi all I have a question regarding name servers. I need to know what name servers to point my
    domain to? My site that I'm hosting here was parked at go daddy. I was going to change the
    name server there with the information I got during the setup and completion. I activated my
    account successfully. And I noticed that when I went to go daddy that the name server it showed on
    there was the same it showed on xisto when I completed the setup the information its says to save.
    Help... hope i gave enough information and that I can get help with this. Thanks for help ....
  3. Mail Servers?
    (3)
    Is there any free mail servers? But decent one. I had a 25 hosts network and I want a free mail
    server that supports some useful features for networks that size.....
  4. Are Name Servers From Different Hosts Compatible?
    (2)
    Recently, I purchased managed DNS for my TLD (maxotek.net), just to see if I could manually get the
    IP address to point to the new Gamma server IP address. The Managed DNS feature requires that I
    change the Name servers to:- WHIZ.EARTH.ORDERBOX-DNS.COM WHIZ.MARS.ORDERBOX-DNS.COM
    WHIZ.MERCURY.ORDERBOX-DNS.COM WHIZ.VENUS.ORDERBOX-DNS.COM Being hosted at Asta, the name servers
    are required to point to:- NS.COMPUTINGHOST.COM NS2.COMPUTINGHOST.COM Because, there were many
    slots for the name servers I appended the former name servers to the list. My question is that, wil....
  5. Strange Errors With Servers?
    (6)
    Well I guess some of the errors could be from my browser or the gamma server but I have had some
    strange things happen. Anyway as some of you may know, I am working on a small site were it is
    possible to save data in a MySQL database. Anyway while using Opera web browser I get a sever
    connection lost error while I am inserting or updating some of my values (other browsers (IE
    explorer est.) take a long time to re-connect but they eventually load the page). Now this was
    driving me crazy because it would work on about half the values and not on the other. They are all
    inse....
  6. Google Servers
    Do you ever wonder about what kind of servers google uses and why they (2)
    Do you ever wonder about what kind of servers google uses? Or why even though with all those
    searches per second (over 1000 times every second) they dont lagg? I was thinking about it and
    Google must have some monster servers like astahost does. After some research i found this:
    Google's server infrastructure is divided in several types, each for a different purpose. Google
    DNS Servers answer the DNS requests and serve as intelligent, worldwide load-balancers. They guess
    the data center nearest to the user to speed up all HTTP requests. Google Web Servers coordinate....
  7. #2002 - The Server Is Not Responding (or The Local Mysql Server's Socket Is Not Correctly Configured) ?
    (0)
    Nevermind.. It is working now.. But what was that? (when it tryed to enter phpMyAdmin i got this
    error: #2002 - The server is not responding (or the local MySQL server's socket is not correctly
    configured) ) ....
  8. Meridian Proxy Servers | New Proxy For Smart Broadband
    (2)
    Smart Broadbans Inc. is a wireless broadband internet service provider from the Philippines.
    Currently offering plan 999 of upto 512Kbps for download and 384Kbps for upload. Due to some
    feedback of some this ISP, users have created for find other way of speeding up their download speed
    upto full burst a canopy can manage. Now here are some Proxy servers under meridian telecoms, and
    smar broadband inc. 121.1.3.194 Port 8080 121.1.3.200 Port 8080 203.84.191.215 Port 8080 .. you
    may use those proxy server if you only subscribed to Smart Broadband Inc. Configuring pro....
  9. Free Dedicated Servers?
    (8)
    does somwane nows if there is a possibilitie to get a game server or a Dedicated server for free i
    want it fore a website the is about mapping and modding frome games sow i can show the maps wat the
    members have made and whene i have a dedicated server i can make the site mutch lacher and better
    so i hope somwane nows a way a lot of thanks robert....
  10. Three DNS Root Servers Taken Down By DoS Attack
    (6)
    According to recent new updates on InformationWeek , a moderate sized Denial of Service (DoS)
    attack which in all probability originated in South Kora , nearly took down 3 of the 13 Root
    Nameservers that collaborate and manage the internet traffic worldwide. When a single company is the
    target of a DoS, it hurts only that particular company. However, a DoS attack on the root servers
    mean attacking the very core of the internet infrastructure and can take down the substantial parts
    of the net in one go. Fortunately for us, those three servers were heavily strai....
  11. Servers Antivirus
    (2)
    hello, i wanna know what is the best software to use for windows 2003 server as an antivirus &
    internet security tool i didn't try any corporate or multi-user versions before so please if you
    can give more than one option that would be nice thx /cool.gif" style="vertical-align:middle"
    emoid="B)" border="0" alt="cool.gif" />....
  12. How To Login To Helm Panel In Widows Servers
    (2)
    how to login to helm panel in widows servers?....
  13. Need Help With Php/mysql And Web Servers Such As Asta's.
    (4)
    Within my site I have built my own basic forum using PHP/Mysql, I always test locally now both using
    EasyPHP and WAMP5 which both give me no problems what so ever. But when I tryed to run the exact
    same code on Asta's hosting services (and possible another I used to use) when creating a new
    thread or adding a reply to an existing one it *sometimes* adds an additional thread/reply as a
    Guest (someone not signed in) with an empty message. This would lead me to believe that somehow the
    page is being refreshed and the variables sent to the database update php file are ....
  14. Gm Sneaky's Free Ragnarok Online Server ^^
    one of the best and bugless server's ever uptime 24\7 Friendl (5)
    Hi everyone, i'm just doin some Pre Grand Opening Server advertising... do you wana be one of
    the strongest on a brand new fresh server, wana help the community grow and be a big part in
    everythin that get's implemented and have a say in where the server is heading then this is the
    server for you...(note if you want a level 99 char without any effort it's not gona happen this
    server is designed to be a fun entertaining yet challenging exsperience..) Info about this new
    server: Grand Opening : Mid April, keep checking the site for info on when it's ....
  15. Running Ventrilo Servers Is Confusing And Hard
    OMFG (1)
    Wow lemme say rent a ventrilo server its confusing and hard! Even if your a computer wize like moi,
    its very very very hard and complicated! But ventrilo is better than Teamspeak to me. So for me its
    worth it! But for you it might not be! If you have any questions or need help ask em here or IM me
    on AIM at sgt m14 or on MSN messenger at mario66@cfl.rr.com or email at same address as msn! I'm
    willing to help with TS or ventrilo! Wrong forum. This isn't some new fact that you learnt
    and wanted to share with people. In future, please be careful about where your ....
  16. Can't Run Any Local Server On This Pc
    help on local servers! (0)
  17. Can't Run Any Local Server On This Pc
    help on local servers! (7)
    I've been having a problem with ALL THE LOCAL SERVERS... i formated my Hd like two months ago..
    and now no server works!!!!! I think something is blocking the apache and the Sql servers.. I have
    Windows Xp Professional SP2, AVG Free antivirus, No firewall, No spyware, no Adware .. kind of
    insecure ain't it? please help me! i have tried XSAS, Uniserver and XA.. somthing (don't
    remeber)... ThanxS! ....
  18. Internet's Root Dns Servers To Stay On Us Soil
    (8)
    QUOTE A decision by the United States to indefinitely retain oversight of the main computers
    that control internet traffic drew concerns Friday from foreign officials, many of whom want an
    international body in charge instead. "When the internet is being increasingly utilized for private
    use, by businesses and so forth, there is a societal debate about whether it's befitting to
    have one country maintaining checks on that," said Masahiko Fujimoto of the Ministry of Internal
    Affairs and Communications' data communications division. "It's likely to fue....
  19. Dns Servers
    How do they work? (6)
    I don't know if this is the exact proper place, but I'll just put it here because it deals
    with the web! /wink.gif' border='0' style='vertical-align:middle' alt='wink.gif' /> I know
    this may sound stupid, but how does a DNS server work? Like big huge companies like Microsoft I know
    has to use one to spread the website out over different servers. Like if you type in
    http://www.microsoft.com , your request goes through a DNS server and it directs you to the proper
    server, right? But now lets say I send an email to Bill. That email has to go through the DNS ....
  20. 2 Servers, 1 Domain
    Server Linking (6)
    Hey, Back when I was searching for a free webhost, I came across this one (name is obviously
    censored and replaced!) http://www.somewebhost.com But when I looked at their plans, they have 2
    servers for hosting. One is paid and the free one. But they have it like, box6.somewebhost.com and
    box7.somewebhost.com, but these are two totally different servers! I would like to know how you do
    this because when looking at Google IP addresses, the one that hosts Google.com is totally different
    than the one that hosts gmail.google.com. Thanks!....
  21. Counter Strike Servers
    Where do you ppl play? (18)
    I would like to know where do the members of Astahost play counter strike and what they feel are the
    best servers. Plese include IP addresses too.....
  22. Plone / Mambo Servers? What On Earth ..
    (1)
    Hi, I am trying to setup some website and was told that PLONE or MAMBO servers are useful
    tools to deploy. I had problem trying to figure oiut how to use them and as I can hardly find any
    "for dummies" tutorials .. I guess I 'll just have to rely once again on my faithful HWZ forum
    again.. hope someone can elighten me on :: 1) How and why are these S/W useful?? 2) When should I
    use them?? 3) HOW TO use them?? or some links to some tutorials THanks Edmund....
  23. HTTP Servers
    What's your favorite? (8)
    Ugh....After hours of looking through servers to install on my comp to run a personal/test site I
    haven't found one that fits all my needs. The list so far is: Apache IIS Omnihttpd Xitami
    Netscape The one I've come to love the most is omnihttpd....But I kept getting a error when I
    tried to run cgi-php scripts The error was: Something enable redirect-cgi-php Or something like
    that... So yeah. If you have any ideas on a server that reseembles omnihttpd please post it here,
    or even better...If you know how to fix that error post htat here to /smile.gif' bor....
  24. Private Servers
    Where? Which? (1)
    There are many games out there where you have to pay to play. Many people seem to don't mind to
    pay almost each month. I, like some of you, am not one of those people. I hear a lot of people talk
    about so called free private servers out there where people can play games online for free? Does any
    where here take part in one? If so, state the game and info to connect.....
  25. Servers For Gmail ?
    POP3 and SMTP (6)
    I want to know regarding the servers for setting up pop access to gmail.... ???? POP 3 and SMTP....
  26. Reseller Servers
    (0)
    message removed SPAM, POST CLOSED*** alphonse, 19 days without a post, and then you spam the
    service. Not nice.....
  27. Time Servers
    How to make one? (0)
    Does anyone know how to make a time server like the ones you can use with programs to sync your
    computer, we have a server for the web at school and id love to be able to make one, i can google
    anything helpful and this sounds like a good idea, anyone have any clues, although i intend to use
    it at schoo, can you do it at astahost in anyway?....
  28. Phantasy Star Online For Dreamcast
    Anyone play on the homebrew servers? (2)
    They're not as bad as people beleive them to be. I actually find some of them better than the
    official Sega/ISAO ones from the days of yore.....
  29. Whats Beter For Servers Windows,unix Or Lunix
    (3)
    whats is better to start a server on a windows,unix or lunix? which one has more security? which get
    less viruses? which is better for programing and web design?....
  30. How do free servers afford CPanel?
    (8)
    Hi I am thinking of building a server and thought I will use CPanel, I thought it only cost like
    £100 but what $1500. How do free servers afford this if you built them yourself? Thanks....

    1. Looking for servers, dnsmasq






*SIMILAR VIDEOS*
Searching Video's for servers, dnsmasq
advertisement




Name Servers - Dnsmasq