[opensuse] bind help
I've set up a minimal bind installation using yast on 10.2 which seems to do the job quite well for DNS servicing my local network. Now I want to add a host name, two actually, 1) to resolve to a specific public IP in another city, and one to point to an internal machine on my network. In the past, putting these in the hosts file of the server running bind would work, but this seems broken in my setup. Note: you may have guessed bind is not my strong suit. -- _____________________________________ John Andersen
John Andersen wrote:
I've set up a minimal bind installation using yast on 10.2 which seems to do the job quite well for DNS servicing my local network.
Now I want to add a host name, two actually, 1) to resolve to a specific public IP in another city, and one to point to an internal machine on my network.
In the past, putting these in the hosts file of the server running bind would work, but this seems broken in my setup.
The resolution is set up through /etc/nsswitch.conf. If you use "files" in addition to dns, then you should be able to use your hosts file for dns resolution. # Legal entries are: # # compat Use compatibility setup # nisplus Use NIS+ (NIS version 3) # nis Use NIS (NIS version 2), also called YP # dns Use DNS (Domain Name Service) # files Use the local files # [NOTFOUND=return] Stop searching if not found so far # # For more information, please read the nsswitch.conf.5 manual page. # hosts: files dns networks: files dns -- Sandy List replies only please! Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday 21 February 2007, Sandy Drobic wrote:
John Andersen wrote:
I've set up a minimal bind installation using yast on 10.2 which seems to do the job quite well for DNS servicing my local network.
Now I want to add a host name, two actually, 1) to resolve to a specific public IP in another city, and one to point to an internal machine on my network.
In the past, putting these in the hosts file of the server running bind would work, but this seems broken in my setup.
The resolution is set up through /etc/nsswitch.conf. If you use "files" in addition to dns, then you should be able to use your hosts file for dns resolution.
# Legal entries are: # # compat Use compatibility setup # nisplus Use NIS+ (NIS version 3) # nis Use NIS (NIS version 2), also called YP # dns Use DNS (Domain Name Service) # files Use the local files # [NOTFOUND=return] Stop searching if not found so far # # For more information, please read the nsswitch.conf.5 manual page. #
hosts: files dns networks: files dns
Yup, that's what I have, (I think that is standard). # passwd: compat group: compat hosts: files dns networks: files dns services: files protocols: files etc etc All the windows machines on the network get their dns set up by dhcp from this server, but they still can not resolve entries in hosts. They have no problem resolving names on the internet (which again, is done by the bind in the suse server). For instance: In the server's /etc/hosts I have this: 192.168.2.200 testmach And the server can ping testmach by name. But none of the windows machines can, it says unknown (the machine is reachable by IP). This is why I'm wondering if there is some other setting I'm missing in bind somewhere. -- _____________________________________ John Andersen
John Andersen wrote:
All the windows machines on the network get their dns set up by dhcp from this server, but they still can not resolve entries in hosts.
I believe they can only use the dns setup, not your hosts file.
They have no problem resolving names on the internet (which again, is done by the bind in the suse server).
For instance: In the server's /etc/hosts I have this: 192.168.2.200 testmach
And the server can ping testmach by name. But none of the windows machines can, it says unknown (the machine is reachable by IP). This is why I'm wondering if there is some other setting I'm missing in bind somewhere. The server can use your host file. Unless you are using DDNS updates from your dhcpd, it is very easy to edit your zone files via Yast, Network Services, DNS Server, Zone files. I as impressed by this Yast module this time (10.2). Alas, if you edit them this way, it will delete the update-allow line in those zone files and disable ddns, as you can't have both. You could create another zone in Yast I suppose for those addresses. Try out Yast for this, it makes it rather easy. Also, check out the sysconfig variables for some very nicely done include "magic". HTH.
-- Joe Morris Registered Linux user 231871 running openSUSE 10.2 x86_64 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday 21 February 2007, Joe Morris (NTM) wrote:
The server can use your host file. Unless you are using DDNS updates from your dhcpd, it is very easy to edit your zone files via Yast, Network Services, DNS Server, Zone files. I as impressed by this Yast module this time (10.2). Alas, if you edit them this way, it will delete the update-allow line in those zone files and disable ddns, as you can't have both. You could create another zone in Yast I suppose for those addresses. Try out Yast for this, it makes it rather easy. Also, check out the sysconfig variables for some very nicely done include "magic". HTH.
Well this is exactly the way it was set up Joe, but yet the the dns server will not serve names in /etc/hosts. -- _____________________________________ John Andersen
John Andersen wrote:
On Wednesday 21 February 2007, Joe Morris (NTM) wrote:
The server can use your host file. Unless you are using DDNS updates from your dhcpd, it is very easy to edit your zone files via Yast, Network Services, DNS Server, Zone files. I am impressed by this Yast module this time (10.2). Alas, if you edit them this way, it will delete the update-allow line in those zone files and disable ddns, as you can't have both. You could create another zone in Yast I suppose for those addresses. Try out Yast for this, it makes it rather easy. Also, check out the sysconfig variables for some very nicely done include "magic". HTH.
Well this is exactly the way it was set up Joe, but yet the the dns server will not serve names in /etc/hosts.
Sorry, bad choice of words (and now out of context). I was saying your server works because it CAN use /etc/hosts, but your windows clients cannot use it and thus need a working DNS. My main point was you can create the zone files with Yast, Network Services, DNS Server. My side point was, if you use dynamically updated dns using your dhcp server, you should NOT use Yast to edit your zone files, or it will mess up the dhcp updating. Hope that is clearer. -- Joe Morris Registered Linux user 231871 running openSUSE 10.2 x86_64 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Wednesday 2007-02-21 at 01:12 -0900, John Andersen wrote: ...
All the windows machines on the network get their dns set up by dhcp from this server, but they still can not resolve entries in hosts.
No, they wont. Ever. The hosts file is private to the machine having it. Define it in bind files instead. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFF3YgKtTMYHG2NR9URAuExAJ47qfe0oAzQMgbdRJ+SUeHaaFwY8ACfbn7W Clvzq4XLmCBcaEXhPKMaZTc= =7Usq -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 22 February 2007, Carlos E. R. wrote:
The Wednesday 2007-02-21 at 01:12 -0900, John Andersen wrote:
...
All the windows machines on the network get their dns set up by dhcp from this server, but they still can not resolve entries in hosts.
No, they wont. Ever. The hosts file is private to the machine having it.
Define it in bind files instead.
-- Cheers, Carlos E. R.
Yes, but WHERE is this defined in bind, Carlos. Not being a bind wizard, I was asking specifically how I might add a name such as "securitycam" to bind so that windows users can just key that into their web browser without having to know the IP of said camera. -- _____________________________________ John Andersen
John Andersen wrote:
On Thursday 22 February 2007, Carlos E. R. wrote:
The Wednesday 2007-02-21 at 01:12 -0900, John Andersen wrote:
...
All the windows machines on the network get their dns set up by dhcp from this server, but they still can not resolve entries in hosts. No, they wont. Ever. The hosts file is private to the machine having it.
Define it in bind files instead.
-- Cheers, Carlos E. R.
Yes, but WHERE is this defined in bind, Carlos.
Not being a bind wizard, I was asking specifically how I might add a name such as "securitycam" to bind so that windows users can just key that into their web browser without having to know the IP of said camera.
Perfect opportunity for you to buy the O'Reilly BIND & DNS book and set up dns services on linux for your lan. You won't regret the experience. Joe -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 22 February 2007, J Sloan wrote:
John Andersen wrote:
On Thursday 22 February 2007, Carlos E. R. wrote:
The Wednesday 2007-02-21 at 01:12 -0900, John Andersen wrote:
...
All the windows machines on the network get their dns set up by dhcp from this server, but they still can not resolve entries in hosts.
No, they wont. Ever. The hosts file is private to the machine having it.
Define it in bind files instead.
-- Cheers, Carlos E. R.
Yes, but WHERE is this defined in bind, Carlos.
Not being a bind wizard, I was asking specifically how I might add a name such as "securitycam" to bind so that windows users can just key that into their web browser without having to know the IP of said camera.
Perfect opportunity for you to buy the O'Reilly BIND & DNS book and set up dns services on linux for your lan. You won't regret the experience.
Joe
Joe, you have a very nice way of saying RTFM ;-) I bet you can tell people to go to hell, and have them looking forward to the trip! -- _____________________________________ John Andersen -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
John Andersen wrote:
On Thursday 22 February 2007, J Sloan wrote:
John Andersen wrote:
Yes, but WHERE is this defined in bind, Carlos.
In a zone file. Please look at the Yast DNS Server module.
Not being a bind wizard, I was asking specifically how I might add a name such as "securitycam" to bind so that windows users can just key that into their web browser without having to know the IP of said camera. Are these all on the same network or in the same domain? Just use yast to set up a zone file and its reverse zone, and add the entries.
-- Joe Morris Registered Linux user 231871 running openSUSE 10.2 x86_64 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
John Andersen wrote:
On Thursday 22 February 2007, J Sloan wrote:
John Andersen wrote:
On Thursday 22 February 2007, Carlos E. R. wrote:
The Wednesday 2007-02-21 at 01:12 -0900, John Andersen wrote:
...
All the windows machines on the network get their dns set up by dhcp from this server, but they still can not resolve entries in hosts.
No, they wont. Ever. The hosts file is private to the machine having it.
Define it in bind files instead.
-- Cheers, Carlos E. R.
Yes, but WHERE is this defined in bind, Carlos.
Not being a bind wizard, I was asking specifically how I might add a name such as "securitycam" to bind so that windows users can just key that into their web browser without having to know the IP of said camera.
Perfect opportunity for you to buy the O'Reilly BIND & DNS book and set up dns services on linux for your lan. You won't regret the experience.
Joe
Joe, you have a very nice way of saying RTFM ;-)
I bet you can tell people to go to hell, and have them looking forward to the trip!
Perish the thought sir! I was only encouraging you to embrace the wonderful learning experience which I myself undertook not so long ago, and have never for a moment regretted. Such skills will stand you in good stead in many arenas. Indeed, I myself have earned a bit of beer money now and again, puttering with dns setups. Joe -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Thursday 2007-02-22 at 12:47 -0900, John Andersen wrote:
No, they wont. Ever. The hosts file is private to the machine having it.
Define it in bind files instead.
Yes, but WHERE is this defined in bind, Carlos.
Not being a bind wizard, I was asking specifically how I might add a name such as "securitycam" to bind so that windows users can just key that into their web browser without having to know the IP of said camera.
Not an easy answer. I can manage my bind configuration, but I'm not so expert as to offer advice... I could very easily give the wrong advice by mistake. Anyway... You should have in /etc/named/zone/ two files for your zone, one direct and one inverse, like: 1.168.192 mydomain The first: ; Primary file for the 100.168.192.in-addr.arpa domain generated on Tue Jan 22 21:58:58 CET 2002 $TTL 86400 1.168.192.in-addr.arpa. SOA myhost.mydomain. root.myhost.mydomain. ( 2006021019 28800 7200 604800 86400 ) NS myhost 1 PTR router.mydomain. 11 PTR myhost.mydomain. The second: ; Primary file for the mydomain domain generated on Tue Jan 22 21:58:58 CET 2002 $TTL 86400 mydomain. SOA myhost.mydomain. root.myhost.mydomain. ( 2006021019 28800 7200 604800 86400 ) NS myhost MX 10 myhost ; Definición de los hosts router A 192.168.1.1 myhost A 192.168.1.11 MX 10 myhost And then, those files have to be referred to in /etc/named.conf: zone "mydomain" in { type master; file "zone/valinor"; }; zone "1.168.192.in-addr.arpa" in { type master; file "zone/1.168.192"; }; There is a howto in the distro. And of course, if there is a Yast module, use it. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFF3s7ptTMYHG2NR9URAiXBAJ9SeJ1eZxd0oxN3tLbZ1SPUHIE7ZQCfXzvV tTCNmYEygmoUnyPnMlx0/Cs= =zi4H -----END PGP SIGNATURE-----
participants (5)
-
Carlos E. R.
-
J Sloan
-
Joe Morris (NTM)
-
John Andersen
-
Sandy Drobic