Hi
I am trying to use Bind as named. And I have successfully set up a chrooted bind.
Anyway, I cannot have it resolve "www" directly.
For example, when I am using nslookup, when enter www.example.com, it will resolve. But when enter www, it will not. I want to have www resolve to www.example.com, what should I do? I have already set $ORIGIN in the zone file, but it does not work.
Thanks.
On Sat, Jul 07, 2007 at 12:58:03PM +0800, Wei Yu alleged:
Hi
I am trying to use Bind as named. And I have successfully set up a chrooted bind.
Anyway, I cannot have it resolve "www" directly.
For example, when I am using nslookup, when enter www.example.com, it will resolve. But when enter www, it will not. I want to have www resolve to www.example.com, what should I do? I have already set $ORIGIN in the zone file, but it does not work.
That is something you set in your own client resolver libraries. Put "search example.com" into /etc/resolv.conf.
On Sat, 2007-07-07 at 12:58 +0800, Wei Yu wrote:
Hi
I am trying to use Bind as named. And I have successfully set up a chrooted bind.
Anyway, I cannot have it resolve "www" directly.
For example, when I am using nslookup, when enter www.example.com, it will resolve. But when enter www, it will not. I want to have www resolve to www.example.com, what should I do? I have already set $ORIGIN in the zone file, but it does not work.
Thanks.
If you have created a zone file for example.com in /var/named/chroot/var/named/example.zone
All you need to do is to add the entry below to your zone file www A ###.###.###.###
This is what I did anyway, and it is working great!!
Greg
On 08/07/2007, at 1:24 PM, Gregory P. Ennis wrote:
On Sat, 2007-07-07 at 12:58 +0800, Wei Yu wrote:
Hi
I am trying to use Bind as named. And I have successfully set up a chrooted bind.
Anyway, I cannot have it resolve "www" directly.
For example, when I am using nslookup, when enter www.example.com, it will resolve. But when enter www, it will not. I want to have www resolve to www.example.com, what should I do? I have already set $ORIGIN in the zone file, but it does not work.
Thanks.
If you have created a zone file for example.com in /var/named/chroot/var/named/example.zone
All you need to do is to add the entry below to your zone file www A ###.###.###.###
This is what I did anyway, and it is working great!!
Not quite.... This will only add a www record to your domain... What I think the original poster wants is to use the DNS Seach suffix functions of DHCP.
This will add the prefix automatically when the host tries to search for a DNS entry...
$ cat /etc/resolv.conf search example.com nameserver x.x.x.x nameserver x.x.x.x
This will get you the desired results. You set it in your dhcpd.conf file as so:
option domain-name "example.com";
-- Steven Haigh
Email: netwiz@crc.id.au Web: http://www.crc.id.au Phone: (03) 9017 0597 - 0404 087 474
Yes, it works. The DNS search suffix matters. Thank you all!
On 7/8/07, Steven Haigh netwiz@crc.id.au wrote:
On 08/07/2007, at 1:24 PM, Gregory P. Ennis wrote:
On Sat, 2007-07-07 at 12:58 +0800, Wei Yu wrote:
Hi
I am trying to use Bind as named. And I have successfully set up a chrooted bind.
Anyway, I cannot have it resolve "www" directly.
For example, when I am using nslookup, when enter www.example.com, it will resolve. But when enter www, it will not. I want to have www resolve to www.example.com, what should I do? I have already set $ORIGIN in the zone file, but it does not work.
Thanks.
If you have created a zone file for example.com in /var/named/chroot/var/named/example.zone
All you need to do is to add the entry below to your zone file www A ###.###.###.###
This is what I did anyway, and it is working great!!
Not quite.... This will only add a www record to your domain... What I think the original poster wants is to use the DNS Seach suffix functions of DHCP.
This will add the prefix automatically when the host tries to search for a DNS entry...
$ cat /etc/resolv.conf search example.com nameserver x.x.x.x nameserver x.x.x.x
This will get you the desired results. You set it in your dhcpd.conf file as so:
option domain-name "example.com";
-- Steven Haigh
Email: netwiz@crc.id.au Web: http://www.crc.id.au Phone: (03) 9017 0597 - 0404 087 474
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos