Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!

Toggle shoutbox Shoutbox Open the Shoutbox in a popup

@  yordan : (19 June 2013 - 02:28 PM) Long Life To Asta New Era
@  agyat : (19 June 2013 - 01:58 PM) New Era Start At Asta Or Asta Start In New Era. :unsure:
@  yordan : (16 June 2013 - 05:41 PM) You're Welcome, Agyat!
@  agyat : (16 June 2013 - 07:38 AM) Thanks Yordan...
@  velma : (16 June 2013 - 12:06 AM) I Have Asked Opa To Check For A Backup.. He'll Let Me Know Soon :)
@  velma : (16 June 2013 - 12:05 AM) T_T It Seems That Someone Has Deleted That Topic Since I Found The Url Of The Topic But It Gives Me An Error
@  yordan : (15 June 2013 - 10:31 PM) @velma : It's A Tuto On How To Create A Login Program.
@  yordan : (15 June 2013 - 10:31 PM) Happy Birthday To Youuuuuu Agyat!
@  yordan : (15 June 2013 - 10:31 PM) Ba$
@  agyat : (15 June 2013 - 04:41 PM) :(
@  agyat : (15 June 2013 - 04:41 PM) Where The Hall I Were? 15Th Is Almost At End And No-One Wished Me "happy Birthday"!!!
@  velma : (14 June 2013 - 10:39 AM) Which Tutorial Is He Searching For?
@  velma : (14 June 2013 - 10:38 AM) Which Tutorial Is He Searching For?
@  yordan : (14 June 2013 - 07:47 AM) Ok, Have A Look Tomorrow.
@  yordan : (13 June 2013 - 03:19 PM) @velma, Can You Have A Look At Feelay's Problem? Seems That His Tutorial Is Not Searchable Today.
@  Feelay : (13 June 2013 - 08:11 AM) Oh, Haha
@  velma : (12 June 2013 - 05:39 PM) T_T Lately My Levels Of Procrastination..... **sigh**
@  velma : (12 June 2013 - 05:38 PM) I'll Do It Later
@  velma : (12 June 2013 - 05:38 PM) Procrastinators.. People Who Keep Saying "i'll Do This In A Bit"
@  Feelay : (12 June 2013 - 02:05 PM) Deal Punishments To What?

Replying to Name Servers - Dnsmasq


Post Options

    • Can't make it out? Click here to generate a new image

  or Cancel


Topic Summary

Jimmy89

Posted 11 August 2007 - 02:42 AM

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.
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!

Sten

Posted 11 August 2007 - 02:06 AM

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

dserban

Posted 10 August 2007 - 09:09 AM

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:
nslookup www.google.com
The result should look like this:
# nslookup www.google.comServer:  dns-cache-2.<name-of-your-ISP>Address: <IP-address-of-some-DNS-server-at-your-ISP>Non-authoritative answer:Name:       www.l.google.comAddresses:  209.85.129.147, 209.85.129.99, 209.85.129.104Aliases:    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:
nslookup 209.85.129.104
The result should look like this:
# nslookup 209.85.129.104Server:  dns-cache-2.<name-of-your-ISP>Address: <IP-address-of-some-DNS-server-at-your-ISP>Name:    fk-in-f104.google.comAddress:  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.enterpris...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.

Review the complete topic (launches new window)