Operating System - HP-UX
1836645 Members
1697 Online
110102 Solutions
New Discussion

Re: How to pass the resolve request to other DNS server if local DNS cannot find

 
Kenneth_61
Frequent Advisor

How to pass the resolve request to other DNS server if local DNS cannot find

Hi All,

In UNIX v11.00, I had setup a DNS server at home. All the PCs at home is just set to a single home DNS server. In the Home DNS sever, how to pass the resolve request to other DNS server if the host (e.g. www.yahoo.com) whose home DNS server cannot find . So, the PCs need not to config 2 DNS server. One is home server, other is ISP DNS. The term is called "Resolve lookup' ???
7 REPLIES 7
Jeremy Smith_10
New Member

Re: How to pass the resolve request to other DNS server if local DNS cannot find

I'm not sure what version of BIND you're running, but assuming your DNS server is otherwise working, you need to put a line like this:

forwarders { 192.168.1.20; };

In your named.conf where the IP address given is that of your ISP.

Stf
Esteemed Contributor

Re: How to pass the resolve request to other DNS server if local DNS cannot find

Or you can just add your second DNS server in /etc/rsolv.conf file if it doesn't find in first it took the second.

# vi /etc/resolv.conf
add the line "nameserver xxx.xxx.xxx.xxx"

Stf ;-)
harry d brown jr
Honored Contributor

Re: How to pass the resolve request to other DNS server if local DNS cannot find


the "forwarders" statement in /etc/named.conf is the correct answer.

Hopefully you are running bind 9.2.* ??

live free or die
harry d brown jr
Live Free or Die
Nguyen Anh Tien
Honored Contributor

Re: How to pass the resolve request to other DNS server if local DNS cannot find

You should refer this link
http://www.docs.hp.com/en/B2355-90685/ch03.html
this docs discuss detail about DNS (Configuring and Administering the BIND Name Service )
HP is simple
Bill Hassell
Honored Contributor

Re: How to pass the resolve request to other DNS server if local DNS cannot find

The easiest way to solve this (regardless of your version of HP-UX and resolver software) is to use /etc/hosts for your local network names/IPaddrs, and your ISP's DNS server for all else. To do this, you need to edit two files: /etc/resolv.conf and /etc/nsswitch.conf. In resolv.conf, just put the ISP's nameserver IP address as in:

nameserver 12.34.56.78

Be sure to verify thaty this nameserver is reachable by using nslookup and explicitly using the DNS server, as in:

nslookup hp.com 12.34.56.78

where 12.34.56.78 is the ISP's nameserver. You should get an immediate response. If not, you'll need to figure out why that nameserver is not available to you.

Now edit nsswitch.conf and change the hosts line to read:

hosts: files[NOTFOUND=continue UNVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]

(this is all one line).

Now verify that you can resolve your own name as in: nslookup $(hostname)
and then try nslookup hp.com

nslookup will follow the steps shown in nsswitch.conf starting with FILES, then the DNS servers listed in resolv.conf. Note that resolv.conf can have 1, 2 or 3 DNS servers listed but if a DNS server is unreachable, it may be 20-30 seconds before the next DNS server is tried.


Bill Hassell, sysadmin
Kenneth_61
Frequent Advisor

Re: How to pass the resolve request to other DNS server if local DNS cannot find

Bill Hassell . Thanks, but mis-understand me.
Server can resolve outside internet hosts. However on client side, if they are just config to have one home DNS server , they cannot see the outside internet hosts.

Problem still after I use forwarders. The home DNS server is using BIND 9.2. Syntax is wrong ? Please help

# cat /etc/named.conf
#
# type domain source file
#

options {

directory "/etc/named.data";
};

zone "0.0.127.IN-ADDR.ARPA" {

type master;

file "db.127.0.0";
};

zone "mydomain.com" {

type master;

file "db.mydomain";
};

zone "1.168.192.IN-ADDR.ARPA" {

type master;

file "db.192.168.1";
};

zone "." {

type hint;

file "db.cache";
};
forwarders {202.67.143.222;};



#cat /var/adm/syslog/syslog.log
Dec 20 21:13:39 server syslogd: restart
Dec 20 21:22:20 server named[364]: loading configuration from '/etc/named.conf'
Dec 20 21:22:20 server named[364]: /etc/named.conf:28: unknown option 'forwarders'
Dec 20 21:22:20 server named[364]: reloading configuration failed: failure
#
Nicolas_17
Frequent Advisor

Re: How to pass the resolve request to other DNS server if local DNS cannot find

Kenneth,

You must put the "forwarders" line inside the options section (top of the file) before the bracket. You can put it under the // query-source address * port 53; line.

Regards.