Madhav Kobal's Blog

This blog will be dedicated to Linux, Open Source and Technology news, affairs, how-tos and virtually EVERYTHING in these domains.

Posts Tagged ‘DNS’

Setup a local DNS server to have access to multiple DNS zones like internet and internal net

Posted by madhavkobal on 09/10/2009

You want to have access (name resolution) for the internet and also for an internal network, but neither the name server for the internet (providers name server) nor the internal one take care of the other area.


While dns clients usual could try to connect multiple name servers in sequence, they only connect to the second or third name server, if the precursor one did not reply to the dns request. But when a name server tells that it could not solve the request the dns client does not ask any further servers.

This can be solved by a local running dns server. This local dns server will be configured to serve both areas (called zones in the bind language).

This cool solution is based on SLE10.


The dns domain names (, in the following steps are example values used for documentation (see also RFC 2606, Section 3).

Package installation

You need the packages bind and bind-chrootenv.

Starting the YaST configuration module

As user root start the yast dns server configuration module:

 yast dns-server

If you configure your dns server the first time the yast screens could be a bit different. If you come back to the dns server configuration once more the following screen shots should match.

Configure DNS-Startup

In our sample we select to startup the dns server during system boot.

Configure DNS Forwarders

To have access to the internet name resolution we first add the name server addresses of this default area and zones. We do not add the internal name server here, this will be done when configuring an additional special zone.

Configure DNS Basic Options

Check the following screen shot for some sample basic options.

Configure DNS-Logging, ACLs and TSIG-Keys

In our sample setup we do not change the setting of the sections “DNS-Logging”, “ACLs” and “TSIG-Keys”.

Configure DNS Zones

In this step we define the internal zone, which is resolved by an internal name server. Our sample zone is “”. Select zone type “forward”. Just add the zone then use the edit button to add the details like the internal name server address.

We can now add an additional optional internal zone, which will be handled by the local name server itself. First we add the zone “”.

In the next step you might configure the contents of your additional zone like acl, name service entries.

Click to view.

Original Author :  fmherschel

Posted in Uncategorized | Tagged: , | Leave a Comment »

resolv.conf – “options rotate” discovery of ISP DNS

Posted by madhavkobal on 03/10/2009

From the  manpage of resolv.conf. While reading it I saw the following really nice option:

rotate               sets  RES_ROTATE  in _res.options, which causes round robin selection of name‐
                     servers from among those listed.  This has the effect of spreading  the  query
                     load  among  all  listed servers, rather than having all clients try the first
                     listed server first every time.

Since then my /etc/resolv.conf on both Gentoo and Debian looks like that:
options rotate

(I prefer using GrNET’s DNS servers than any others in Greece, especially for my laptop configuration. Since they allow recursion I can use them to avoid lousy DNS services provided by lousy DSL routers regardless of the ISP I am currently using, when I am “mobile” with my laptop.)

While using the following config I issued a ping command on a teminal and a tcpdump command on another to see what was actually happening. The result looked like this:
root@lola:~# tcpdump -ni eth1 port 53
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes
11:20:46.405694 IP > 39212+ A? (25)
11:20:46.444266 IP > 39212* 1/5/8 A (319)
11:20:46.484490 IP > 50452+ PTR? (46)
11:20:46.584171 IP > 50452 ServFail 0/0/0 (46)
11:20:46.584449 IP > 50452+ PTR? (46)
11:20:46.624179 IP > 50452 1/7/6 (357)
11:20:47.484420 IP > 33179+ PTR? (46)
11:20:47.524176 IP > 33179 1/7/6 (357)
11:20:48.484483 IP > 21949+ PTR? (46)
11:20:48.524184 IP > 21949 1/3/6 (271)
11:20:49.487610 IP > 8619+ PTR? (46)
11:20:49.534204 IP > 8619 ServFail 0/0/0 (46)
11:20:49.534429 IP > 8619+ PTR? (46)
11:20:49.574138 IP > 8619 1/7/6 (357)
11:20:50.494537 IP > 3415+ PTR? (46)
11:20:50.534145 IP > 3415 1/7/6 (357)
11:20:51.494552 IP > 4504+ PTR? (46)
11:20:51.534205 IP > 4504 1/3/6 (271)
11:20:52.494554 IP > 48450+ PTR? (46)
11:20:52.544197 IP > 48450 ServFail 0/0/0 (46)
11:20:52.544409 IP > 48450+ PTR? (46)
11:20:52.584232 IP > 48450 1/7/6 (357)

People who are used to reading tcpdump output will immediately point out the ServFail entries of the log. Server refused to provide proper results for the PTR query of

Further investigation of the problem:

root@lola:~# dig ptr @
;  IN  PTR

root@lola:~# dig ptr @
;  IN  PTR

root@lola:~# dig ptr @
;  IN  PTR

It was obvious that 2 out of 3 DNS servers responded as they should and the other did not.

Original Author : kargig

Posted in Uncategorized | Tagged: , | Leave a Comment »