[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

lwresd.conf - Lightweight Resolver Daemon configuration guidelines

Posted on 2005-04-24
4
Medium Priority
?
2,209 Views
Last Modified: 2012-06-22
I am interested in configuring lwresd.  Is /etc/lwresd.conf used in lieu of /etc/resolve.conf or in addition to it?

What is the format of an lwresd.conf file?  What are the keywords and values that are allowed?

The manual page for lwsresd makes no mention of a -c option only a -C, however entering "lwresd --help" reveals that "-c" is a valid option and the description implies that lwresd.conf serves a different purpose than resolv.conf.

I have never found any example of a lwresd.conf file on google.  I have found that a zero length /etc/lwresd.conf file was installed somehow on my linux.

In general, using "rndc" I am unable to prove that "lwresd" is working correctly and I suspect that the root cause of the issue is that the resolver libraries and lwresd.conf are not on the same page and that a properly configured lwresd.conf remedy this.
0
Comment
Question by:tomatoyohe
  • 2
4 Comments
 
LVL 3

Assisted Solution

by:joju
joju earned 1900 total points
ID: 13857084
Hi,

Use the link below:

http://www.linuxforum.com/bind/Bv9ARM.ch05.html


Some extract:

Running a Resolver Daemon

To use the lightweight resolver interface, the system must run the resolver daemon lwresd.

By default, applications using the lightweight resolver library will make UDP requests to the IPv4 loopback address (127.0.0.1) on port 921. The address can be overridden by lwserver lines in /etc/resolv.conf. The daemon will try to find the answer to the questions "what are the addresses for host foo.example.com?" and "what are the names for IPv4 address 10.1.2.3?"

The daemon currently only looks in the DNS, but in the future it may use other sources such as /etc/hosts, NIS, etc.

The lwresd daemon is essentially a caching-only name server that answers requests using the lightweight resolver protocol rather than the DNS protocol. Because it needs to run on each host, it is designed to require no or minimal configuration. Unless configured otherwise, it uses the name servers listed on nameserver lines in /etc/resolv.conf as forwarders, but is also capable of doing the resolution autonomously if none are specified.

The lwresd daemon may also be configured with a named.conf style configuration file, in /etc/lwresd.conf by default. A name server may also be configured to act as a lightweight resolver daemon using the lwres statement in named.conf.


Thanks,
Joju.
0
 

Author Comment

by:tomatoyohe
ID: 13857888
Hi thanks for the post, but I've already read the standard Bind 9 administrators documentation on this topic several times.  To be awarded the 475 points, I need to know the differences between what goes into /etc/resolv.conf and/etc/lwresd.conf as well as all of the valid configuration statements that can be placed in /etc/lwresd.conf.  A valid sample of an /etc/lwresd.conf file would be of great help.
0
 
LVL 3

Accepted Solution

by:
joju earned 1900 total points
ID: 13858390
Hi,

  lwresd uses /etc/resolve.conf to forward dns queries to the dns server mentioned in it. If no ip is mentioned then it will resolve itself.

   /etc/lwresd.conf is used to define custom domains in the network. its syntax is same as /etc/named.conf ( used by named .. another resolver)

Thanks,
Joju.


for eg: my lwresd.conf looks like:

i use it to resolve acm.bench.tst to 10.1.1.199

// ---------------------------------------------------------

options {
        directory "/var/named";
};
controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
        type hint;
        file "named.ca";
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};
zone "1.10.IN-ADDR.ARPA" {
        type master;
        file "bench.tst.rev";
};

zone "bench.tst" {
        type master;
        file "bench.tst";
};
include "/etc/rndc.key";

// ------------------------------------------------------

-> added a zone bench.tst for our network
-> files bench.tst and bench.tst.rev should be in /var/named/
as mentioned in options in the conf file.

file bench.tst:
// ------------------------------------------------------
$TTL 3600

@ IN SOA bench.tst. root.bench.tst. (
         20000833; Serial
         10800   ; Refresh
         1801    ; Retry
         3600000 ; Expire
         259200  ; Minimum
)

        IN      NS      ns.bench.tst.
ns      IN      A       10.1.1.1

acm             IN      A       10.1.1.199
// ---------------------------------------------------
file bench.tst.rev:

// ----------------------------------------------------

$TTL 3600

@ IN SOA bench.tst. root.bench.tst. (
         20000833; Serial
         10800   ; Refresh
         1801    ; Retry
         3600000 ; Expire
         259200  ; Minimum
)

        IN      NS      ns.bench.tst.
ns      IN      A       10.1.1.1

199.1.1.10.IN-ADDR.ARPA.                IN      PTR     acm.bench.tst.
// ---------------------------------------------------------



0
 
LVL 22

Expert Comment

by:pjedmond
ID: 13866652
resolv.conf is a very simple file. Basically an identification for the domain, and a list of DNS servers that can be queried:
--------------X8--------------------
nameserver 192.168.2.1
nameserver 194.72.9.34
nameserver 194.74.65.68
domain mydomain.co.uk
--------------X8--------------------

Amazingly enough, the above is also a valid lwresd.conf file. In fact, if the lwresd.conf file does not exist, then in many cases the lwresd will read the resolv.conf instead.

I personally haven't used any other commands for the lwresd, and the only fields that I can see are useful to the lwresd are the nameserver ones, as this daemon has no access to anything other than the DNS servers, and it's own cache of previously requested name/ip address pairs. It also omits any 'trusted' capability which could be used to update DNS servers....so I guess that the only commands that you need in your lwresd.conf file are the nameserver ones. I think that the lwresd *really* is that 'lightweight'!



0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month18 days, 1 hour left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question