Re: cache-only named won't resolve "localhost"
Alex Zbyslaw <[EMAIL PROTECTED]> writes: > Gary W. Swearingen wrote: > >>Mozilla apparently doesn't even use my local DNS as it still hangs. >>(I must admit that I've never checked my caching DNS's cache.) >> >> > Mozilla will use resolve.conf, if it is there. It will also cache answers > for a long time and requires restarting if > you, say, add a host to /etc/hosts. > > I missed the beginiing of the thread, but why would you want to run without > /etc/resolv.conf? That was just a side-issue I threw in after I read a comment about using resolv.conf's "domain" and/or "search". Its manpage says: On a normally configured system this file should not be necessary. so I just tried doing without it; host, dig, and nslookup don't need it (even when not told which DNS server to use), but my mail hung up, so either Gnus or, more likely, sendmail needs resolv.conf. The orignial and still-remaining problem was that Mozilla hangs when given "localhost/index.html" or "localhost.localhost/index.html". Then I noticed "host" didn't work and that bothered me. But I got that fixed and I don't much care about the original Mozilla problem. It appears the Mozilla doesn't use my resolver library, /etc/hosts, or my localhost cache-only DNS server. I did try restarting Mozilla after reading your comment. Don't worry about it. Thanks. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: cache-only named won't resolve "localhost"
Gary W. Swearingen wrote: Now "host", "dig", and "nslookup" work OK, even without an /etc/resolv.conf file. But sendmail seems to need the later. (It just has "nameserver 127.0.0.1".) [...] Mozilla apparently doesn't even use my local DNS as it still hangs. (I must admit that I've never checked my caching DNS's cache.) Mozilla will use resolve.conf, if it is there. It will also cache answers for a long time and requires restarting if you, say, add a host to /etc/hosts. I missed the beginiing of the thread, but why would you want to run without /etc/resolv.conf? --Alex ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: cache-only named won't resolve "localhost"
Chuck Swiger <[EMAIL PROTECTED]> writes: > Note that the resolver will treat lookups of "localhost." and "localhost" > differently if you have a domain or search > directive specified in /etc/resolv.conf. You could and perhaps should ensure > that the one ending in a period exists in > a zone file on the nameserver, and maps via an A record to 127.0.0.1: Apparently so. I've sorta followed your suggestions and used the following rather verbose master/localhost with good results (except Mozilla). You needn't read further; I've just added some observations. $TTL 604800 localhost. IN SOA localhost. root.localhost. ( 20050816 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Minimum ;Name Server: localhost.INNSlocalhost. ;Host Address: localhost.INA 127.0.0.1 ;Host Alias: localhost.localhost.INCNAMElocalhost. ; The End. Now "host", "dig", and "nslookup" work OK, even without an /etc/resolv.conf file. But sendmail seems to need the later. (It just has "nameserver 127.0.0.1".) I tried to make "localhost.localhost" the canonical domain and "localhost." the alias (so it would better correspond to the reverse mapping which has 127.0.0.1 > localhost.localhost.), but it then wouldn't resolve "localhost" OR "localhost.localhost". My DNS book implies taht any domain name can be assigned to a host, as it can with the CNAME above, but it seems that important software either insists that a host has a two-part domain name or chokes on a FQDN like "localhost.", which ends with a dot. So be it. Mozilla apparently doesn't even use my local DNS as it still hangs. (I must admit that I've never checked my caching DNS's cache.) I know little about proxies, but I tried configuring Mozilla to use a "localhost" proxyand it then resolved "localhost" OK, but my funky python-only web server couldn't find the index.html it found with 127.0.0.1. Oh well, I don't much care about Mozilla problems as long as I can work around it, which I can. Thanks. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: cache-only named won't resolve "localhost"
Gary W. Swearingen wrote: [ ... ] so I'd think domain resolution should look in /etc/hosts before even checking my cache-only named. Which it seems to do for "ping", but not for "host", "nslookup", or "mozilla". As Lowell noted, programs like "nslookup" and "dig" are designed to query DNS specificly, not look into your flatfiles for hostname/IP mappings. I'm still wondering if I should be declaring a forward zone for "localhost" or "localhost.localhost"; it seems kinda strange that the script would set up a reverse for it, but say nothing about the forward. Note that the resolver will treat lookups of "localhost." and "localhost" differently if you have a domain or search directive specified in /etc/resolv.conf. You could and perhaps should ensure that the one ending in a period exists in a zone file on the nameserver, and maps via an A record to 127.0.0.1: ; ; BIND data file for local loopback interface ; $TTL 604800 @ IN SOA localhost. root.localhost. ( 1 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Default TTL ; @ IN NS localhost. @ IN A 127.0.0.1 -- I inherited this from somewhere, you could remove all but the first "IN" (it defaults), as well as being less clever about reusing @, but add salt as needed. :-) It is probably also a reasonable idea to have an A record for localhost in each forward zone file, so that "localhost.example.com" resolves immediately and stops rather than querying names throughout the search list of domains. This can reduce annoying DNS delays significantly in a number of circumstances, not the least of which are client machines with less-than-brillant resolver routines (think WinNT 4). Oh, yeah, this all was prompted by the notion that some other programs, such as squid in particular, also use their own resolver routines like "nslookup" does. But Mozilla ought to pay attention to /etc/hosts. The connection between these two is that you could uncouple mozilla from doing it's own DNS by pointing at a proxy server for testing what is going on -- -Chuck ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: cache-only named won't resolve "localhost"
Lowell Gilbert <[EMAIL PROTECTED]> writes: > Of course it won't work for nslookup(1); it's not supposed to. > nslookup is specifically intended for querying a name server. The > documentation for host(1) isn't as clear on the subject, but my > reading of it seems to indicate the same thing. Well that sure explains something. But I was also looking at the "bind" docs thinking it should be able to read /etc/hosts or call the name server host's resolver ("gethostbyname", etc.), but didn't find anything, I suppose because someone thinks it is a bad idea since the resolver library is supposed to look at both databases. I'm still wondering if I should be declaring a forward zone for "localhost" or "localhost.localhost"; it seems kinda strange that the script would set up a reverse for it, but say nothing about the forward. I'm also wondering now what "host"-type command just queries the resolver. But I guess "ping" works well enough. > So why it isn't > working for mozilla is the only anomaly you are seeing. What is the > syntax you are using for pointing mozilla at your localhost, and what > are the precise results? I've tried: localhost/index.html localhost.localhost/index.html (getting desparate:) localhost:80/index.html http://localhost/index.html This worked immediately: 127.0.0.1/index.html The bad Mozilla results are a status line saying "Connecting to ..." and, IIRC, I saw a twirly thing until it times out after several minutes, with no error message. I didn't see anything related to DNS in "preferences". ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: cache-only named won't resolve "localhost"
[EMAIL PROTECTED] (Gary W. Swearingen) writes: > Kevin Kinsey <[EMAIL PROTECTED]> writes: > > > Did you `sh /var/named/etc/namedb/make-localhost` ? > > Yup, but that only handles the reverse translation (which works OK) > and, of course, doesn't handle other stuff I might have in "/etc/hosts". > > I also have in /etc/nsswitch.conf: > hosts: files dns > > so I'd think domain resolution should look in /etc/hosts before > even checking my cache-only named. Which it seems to do for "ping", > but not for "host", "nslookup", or "mozilla". Of course it won't work for nslookup(1); it's not supposed to. nslookup is specifically intended for querying a name server. The documentation for host(1) isn't as clear on the subject, but my reading of it seems to indicate the same thing. So why it isn't working for mozilla is the only anomaly you are seeing. What is the syntax you are using for pointing mozilla at your localhost, and what are the precise results? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: cache-only named won't resolve "localhost"
Kevin Kinsey <[EMAIL PROTECTED]> writes: > Did you `sh /var/named/etc/namedb/make-localhost` ? Yup, but that only handles the reverse translation (which works OK) and, of course, doesn't handle other stuff I might have in "/etc/hosts". I also have in /etc/nsswitch.conf: hosts: files dns so I'd think domain resolution should look in /etc/hosts before even checking my cache-only named. Which it seems to do for "ping", but not for "host", "nslookup", or "mozilla". > Or, maybe I'm just not catching on :-( Caching on? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: cache-only named won't resolve "localhost"
Gary W. Swearingen wrote: I think I followed the bind manual and poked around /var/named and it has been working OK for a few weeks until I pointed my browser to "localhost" and then I tried "host localhost". It can resolve "127.0.0.1" back to "localhost.localhost." fine, but if I try my name "localhost" or "localhost.localhost", I get this: ";; connection timed out; no servers could be reached" (at least until I tried it just now while on-line, when it works OK, resolving my modem/router's localhost, I suppose). /etc/hosts: ::1 localhost.localhost localhost 127.0.0.1localhost.localhost localhost 10.0.0.4 localhost.localhost localhost /etc/hosts.conf: # Auto-generated from nsswitch.conf, do not edit hosts bind /etc/resolv.conf (same with this file missing): nameserver 127.0.0.1 I can "ping localhost" OK. I thought that "host" should use the same stub resolver as "ping" before trying "bind". Can I not use "/etc/hosts" with a cache-only named? Must I have an authoritive zone for "localhost"? Or what? Thanks. Did you `sh /var/named/etc/namedb/make-localhost` ? Or, maybe I'm just not catching on :-( Kevin Kinsey ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
cache-only named won't resolve "localhost"
I think I followed the bind manual and poked around /var/named and it has been working OK for a few weeks until I pointed my browser to "localhost" and then I tried "host localhost". It can resolve "127.0.0.1" back to "localhost.localhost." fine, but if I try my name "localhost" or "localhost.localhost", I get this: ";; connection timed out; no servers could be reached" (at least until I tried it just now while on-line, when it works OK, resolving my modem/router's localhost, I suppose). /etc/hosts: ::1 localhost.localhost localhost 127.0.0.1 localhost.localhost localhost 10.0.0.4localhost.localhost localhost /etc/hosts.conf: # Auto-generated from nsswitch.conf, do not edit hosts bind /etc/resolv.conf (same with this file missing): nameserver 127.0.0.1 I can "ping localhost" OK. I thought that "host" should use the same stub resolver as "ping" before trying "bind". Can I not use "/etc/hosts" with a cache-only named? Must I have an authoritive zone for "localhost"? Or what? Thanks. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"