Results 1 to 10 of 10
Hi, I have installed centos5.4 on my server and has set up a bind9.6 to resolve host names inside my lan network. I have some question and hope some on ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-11-2010 #1Just Joined!
- Join Date
- Mar 2010
- Posts
- 6
[SOLVED] resolv.conf
Hi, I have installed centos5.4 on my server and has set up a bind9.6 to resolve host names inside my lan network. I have some question and hope some on could give me an advice.
I have configured named.conf and resolv.conf like below
acl "lan" {
192.168.13.0/24;
192.168.12.0/24;
192.168.11.0/24;
127.0.0.1;
};
acl "secondary" {
192.168.11.12;
192.168.13.12;
};
options {
directory "/usr/local/namedb";
allow-recursion {lan;};
allow-query {lan;};
};
view "lan" {
match-clients {lan;};
zone "." {
type hint;
file "db.local";
};
zone "example.lan" {
type master;
file "primary/db.example.lan";
allow-transfer { secondary;};
};
zone "168.192.in-addr.arpa" {
type master;
file "primary/db.168.192.in-addr.arpa";
allow-transfer { secondary;};
};
};
cat /etc/resolv.conf
domain example.lan
nameserver 127.0.0.1
inside db.example.lan, has hostname of ns1.example.lan ns2.examle.lan test.example.lan.
on my server, i can resolve with both "ns1.example.lanand" "ns1"
but on my clients inside lan network, i can resolve only with "ns1.example.lan"
when i try to resolve "ns1" it fails.
how could i configure to resolve with "ns1" on my clients?
i thought about editing hosts file on clients but i want to use nameserver.
- 03-11-2010 #2Just Joined!
- Join Date
- Aug 2009
- Location
- Evil Empire
- Posts
- 33
Do you have something like this?
Code:cat /etc/hosts 127.0.0.1 localhost.network.lan localhost 192.168.10.31 myserver.network.lan myserver 192.168.10.112 mydns.network.lan mydns
- 03-11-2010 #3
Bind has no knowledge of short names, which is what you are looking to do.
On every client you want to use short names add in your resolve.conf file the search line at the top as follows:
Code:search example.lan
- 03-11-2010 #4Just Joined!
- Join Date
- Mar 2010
- Posts
- 6
Hi mzv,
thanks for the responce.
I also have view "wan" section in named.conf and inside that i use ns1.example.com as hostname.
I have written external domain for hosts name on server.
cat /etc/host
127.0.0.1 localhost
127.0.0.1 ns1 ns1.example.com
::1 localhost6.localdomain6 localhost6
- 03-11-2010 #5Just Joined!
- Join Date
- Mar 2010
- Posts
- 6
hi, Lazydog
so resolv.conf only works for client its self?
like in cases with 100 or more clients in lan netwrok,
are there a way to use short name with out every one
edit their resolv.conf?
- 03-11-2010 #6
Not that I am aware of. You need to edit resolv.conf to use short names.
- 03-11-2010 #7Just Joined!
- Join Date
- Mar 2010
- Posts
- 6
thank you for your help.
my clients in network are windows clients.
So I will look for other way to solve this problem
- 03-11-2010 #8
For windows you need to edit the interface and configure the search domains there under Advance. Not sure if this can be done through dhcp.
- 03-11-2010 #9Just Joined!
- Join Date
- Mar 2010
- Posts
- 6
Hi,
currently I'm configuring each interface with static ip address.
I'll try to setup the dhcp server and see if i could do as i like.
thanks
- 04-18-2010 #10Just Joined!
- Join Date
- Mar 2010
- Posts
- 6
sorry, that my reply got so late.
finally the problem solved.
I have configured dhcp with
option domain-name "example.com"
now I could access to my servers with only hostname.
thank you very much for many helps



