no servers could be reached
dig kia.czj ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>> kia.czj ;; global options: printcmd ;; connection timed out; no servers could be reached my ip is 192.168.18.128 my named.conf options { listen-on port 53 { 192.168.18.128; 127.0.0.1; }; listen-on-v6 port 53 { ::1; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; // Those options should be used carefully because they disable port // randomization // query-sourceport 53; // query-source-v6 port 53; allow-query { 192.168.18.128; 127.0.0.1; }; allow-query-cache { 192.168.18.128; 127.0.0.1; }; }; view localhost_resolver { match-clients { localhost; }; match-destinations { localhost; }; recursion yes; include "/etc/named.rfc1912.zones"; }; view czj { match-clients { 192.168.18.128; localhost; }; match-destinations { 192.168.18.128; localhost; }; recursion yes; zone "czj" { type master; file "czj.zone"; }; }; # End of named.conf my czj.zone $TTL86400 czj. IN SOA localhost. root.localhost. ( 1997022700 ; Serial 28800 ; Refresh 14400 ; Retry 360; Expire 86400 ); Minimum czj. IN NS localhost. kia IN A 192.168.18.1 my /etc/resolve.conf ; generated by /sbin/dhclient-script search czj nameserver 192.168.18.128 named-checkzone named-checkconf passed, I suppose the configure works but only get no servers could be reached.What's wrong with my config? Thanks in advance. ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: no servers could be reached
I'm trying to config a bind server which could answering queries (at least from 127.0.0.1 and 192.168.18.128) like "dig kia.czj" but I failed to. perhaps my ignorance about match-clients and match-destinations statements failed my attempt, or more likely, "SOA and NS of localhost. seems wrong". It should be localhost.localdomain.And I used to think the $origin statement is not necessary, the idea about the zone name could be got from named.conf. I'll do some testing before come back, thanks. 2011/7/28 Alan Clegg : > On 7/28/2011 4:16 AM, uifid...@gmail.com wrote: > >> view localhost_resolver { >> match-clients { localhost; }; >> match-destinations { localhost; }; >> recursion yes; >> include "/etc/named.rfc1912.zones"; >> }; >> view czj { >> match-clients { 192.168.18.128; localhost; }; >> match-destinations { 192.168.18.128; localhost; }; >> recursion yes; >> zone "czj" { >> type master; >> file "czj.zone"; >> }; >> }; > >> named-checkzone named-checkconf passed > > These check syntax but not semantics. As someone else pointed out, it > looks like your zone file is messed up a bit. Additionally, the views > above have both match-clients and match-destinations which I doubt you > want, and you have localhost listed in both... > > What is it that you are trying to do and we might be able to help you > out some... > > AlanC > > > ___ > Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe > from this list > > bind-users mailing list > bind-users@lists.isc.org > https://lists.isc.org/mailman/listinfo/bind-users > ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: no servers could be reached
Sorry, it's a typo in the maillist, but not in my file system. My resolv.conf is in the right place. 2011/7/29 Michael McNally : > On 7/28/11 12:16 AM, uifid...@gmail.com wrote: >> >> my /etc/resolve.conf > > Note: ^^^ >> >> named-checkzone named-checkconf passed, I suppose the configure works >> but only get no servers could be reached.What's wrong with my config? > > Your resolv.conf is in the wrong place. Let's see what happens when > that occurs: > > With resolv.conf in place: > >> Chickamin-River:~ $ dig www.isc.org >> >> ; <<>> DiG 9.6.0-APPLE-P2 <<>> www.isc.org >> ;; global options: +cmd >> ;; Got answer: >> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5913 >> ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 >> >> ;; QUESTION SECTION: >> ;www.isc.org. IN A >> >> ;; ANSWER SECTION: >> www.isc.org. 263 IN A 149.20.64.42 >> >> ;; Query time: 49 msec >> ;; SERVER: 8.8.8.8#53(8.8.8.8) >> ;; WHEN: Thu Jul 28 11:42:34 2011 >> ;; MSG SIZE rcvd: 45 > > > With resolv.conf in the wrong place: > > >> Chickamin-River:~ $ mv /etc/resolv.conf /etc/resolv.conf.moved >> Chickamin-River:~ $ dig www.isc.org >> >> ; <<>> DiG 9.6.0-APPLE-P2 <<>> www.isc.org >> ;; global options: +cmd >> ;; connection timed out; no servers could be reached > > ___ > Please visit https://lists.isc.org/mailman/listinfo/bind-users to > unsubscribe from this list > > bind-users mailing list > bind-users@lists.isc.org > https://lists.isc.org/mailman/listinfo/bind-users > ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: no servers could be reached
still get "no servers could be reached", need help. #dig @127.0.0.1 nsc1.domainx ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>> @127.0.0.1 nsc1.domainx. ; (1 server found) ;; global options: printcmd ;; connection timed out; no servers could be reached cat /etc/resolv.conf ; generated by /sbin/dhclient-script search domainx localdomain nameserver 127.0.0.1 cat var/named/named.conf // // named.caching-nameserver.conf // options { listen-on port 53 { 192.168.18.128; 127.0.0.1; }; listen-on-v6 port 53 { ::1; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; }; logging { channel default_debug { file "data/named.run"; severity dynamic; }; }; view localhost_resolver { match-clients { localhost; }; match-destinations { localhost; }; recursion yes; include "/etc/named.rfc1912.zones"; }; view viewx { include "domainx.zones"; }; #cat var/domainx.zones zone "domainx" IN { type master; file "domainx.zone"; allow-update { none; }; }; #cat var/domainx.zone $TTL86400 $origin domainx. @ IN SOA ns1 root.localhost. ( 1997022704 ; Serial 28800 ; Refresh 14400 ; Retry 360; Expire 86400 ); Minimum IN NS ns1 ns1.domainx.IN A 192.168.18.128 ns2.domainx.IN A 127.0.0.1 nsc1IN CNAME ns1 nsc2IN CNAME ns2 ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: no servers could be reached
#hostname CentOS3 Is it matter? 2011/7/29 uifid...@gmail.com : > still get "no servers could be reached", need help. > > #dig @127.0.0.1 nsc1.domainx > > ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>> @127.0.0.1 nsc1.domainx. > ; (1 server found) > ;; global options: printcmd > ;; connection timed out; no servers could be reached > > cat /etc/resolv.conf > ; generated by /sbin/dhclient-script > search domainx localdomain > nameserver 127.0.0.1 > > cat var/named/named.conf > // > // named.caching-nameserver.conf > // > options { > listen-on port 53 { 192.168.18.128; 127.0.0.1; }; > listen-on-v6 port 53 { ::1; }; > directory "/var/named"; > dump-file "/var/named/data/cache_dump.db"; > statistics-file "/var/named/data/named_stats.txt"; > memstatistics-file "/var/named/data/named_mem_stats.txt"; > }; > logging { > channel default_debug { > file "data/named.run"; > severity dynamic; > }; > }; > view localhost_resolver { > match-clients { localhost; }; > match-destinations { localhost; }; > recursion yes; > include "/etc/named.rfc1912.zones"; > }; > view viewx { > include "domainx.zones"; > }; > > > #cat var/domainx.zones > zone "domainx" IN { > type master; > file "domainx.zone"; > allow-update { none; }; > }; > > #cat var/domainx.zone > $TTL 86400 > $origin domainx. > @ IN SOA ns1 root.localhost. ( > 1997022704 ; Serial > 28800 ; Refresh > 14400 ; Retry > 360 ; Expire > 86400 ) ; Minimum > > IN NS ns1 > ns1.domainx. IN A 192.168.18.128 > ns2.domainx. IN A 127.0.0.1 > nsc1 IN CNAME ns1 > nsc2 IN CNAME ns2 > ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: no servers could be reached
the zones file is located at /var/named/chroot/var/named/domainx.zones. #cat var/domainx.zones should be var/named/domainx.zones #cat var/domainx.zone should be var/named/domain.zone Sorry for my typo. 2011/7/29 Danilo Godec : > On 07/29/2011 08:17 AM, uifid...@gmail.com wrote: >> >> cat var/named/named.conf >> // >> // named.caching-nameserver.conf >> // >> options { >> listen-on port 53 { 192.168.18.128; 127.0.0.1; }; >> listen-on-v6 port 53 { ::1; }; >> directory "/var/named"; >> dump-file "/var/named/data/cache_dump.db"; >> statistics-file "/var/named/data/named_stats.txt"; >> memstatistics-file "/var/named/data/named_mem_stats.txt"; >> }; >> logging { >> channel default_debug { >> file "data/named.run"; >> severity dynamic; >> }; >> }; >> view localhost_resolver { >> match-clients { localhost; }; >> match-destinations { localhost; }; >> recursion yes; >> include "/etc/named.rfc1912.zones"; >> }; >> view viewx { >> include "domainx.zones"; >> }; >> >> >> #cat var/domainx.zones >> zone "domainx" IN { >> type master; >> file "domainx.zone"; >> allow-update { none; }; >> }; > > Where on the filesystem is your 'domainx.zones' file? > > According to you 'include "domainx.zones"' it should be > '/var/named/domainx.zones', but according to your 'cat var/domainx.zones' > it's in some 'var/' subdirectory. > > Either use the full path for the include or move the domainx.zones file into > the /var/named and use a relative path from there. > > Danilo > > ___ > Please visit https://lists.isc.org/mailman/listinfo/bind-users to > unsubscribe from this list > > bind-users mailing list > bind-users@lists.isc.org > https://lists.isc.org/mailman/listinfo/bind-users > ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: no servers could be reached
Thank you Danilo Godec, Thank you Lyle Giese Thank you everyone. I made a mistake on the localhost view. It's a part of the example config and I thought it's out of question, but it's in the question when I try to resolve domainx. After comment out the localhost view, I get what I have expect. 2011/7/29 Lightner, Jeff : > Using /var/named/chroot/... means you should have bind-chroot package > installed. > > Also you need to be sure all references within named.conf are relative to the > chroot directory rather than absolute real paths and be sure the files are in > those relative paths. That is to say it is proper to reference files as > being in "/etc" or "/var/named" but the actual files referenced must exist in > "/var/named/chroot/etc" or "/var/named/chroot/var/named". > > Examples from your config: > > /var/named/data/named_stats.txt as refrenced below should actually exist as > /var/named/chroot/var/named/data/named_stats.txt. > > /etc/named.rfc1912.zones as referenced below should actually exist as > /var/named/chroot/etc. > > > > > > > > -Original Message- > From: bind-users-bounces+jlightner=water@lists.isc.org > [mailto:bind-users-bounces+jlightner=water@lists.isc.org] On Behalf Of > Danilo Godec > Sent: Friday, July 29, 2011 5:38 AM > To: bind-users@lists.isc.org > Subject: Re: no servers could be reached > > On 07/29/2011 10:36 AM, uifid...@gmail.com wrote: >> the zones file is located at /var/named/chroot/var/named/domainx.zones. >> #cat var/domainx.zones should be var/named/domainx.zones >> #cat var/domainx.zone should be var/named/domain.zone >> Sorry for my typo. > > So this should be OK then. > > Your view statements in this example say that 'localhost' will use the > 'localhost_resolver' and everything else will use the 'viewx' view - but > you don't have the 'domainx.zone' in your 'localhost_resolver' view. > > Try adding 'include "domainx.zones";' to the 'localhost_resolver' view... > > Danilo > > >> >> 2011/7/29 Danilo Godec: >>> On 07/29/2011 08:17 AM, uifid...@gmail.com wrote: >>>> cat var/named/named.conf >>>> // >>>> // named.caching-nameserver.conf >>>> // >>>> options { >>>> listen-on port 53 { 192.168.18.128; 127.0.0.1; }; >>>> listen-on-v6 port 53 { ::1; }; >>>> directory "/var/named"; >>>> dump-file "/var/named/data/cache_dump.db"; >>>> statistics-file "/var/named/data/named_stats.txt"; >>>> memstatistics-file "/var/named/data/named_mem_stats.txt"; >>>> }; >>>> logging { >>>> channel default_debug { >>>> file "data/named.run"; >>>> severity dynamic; >>>> }; >>>> }; >>>> view localhost_resolver { >>>> match-clients { localhost; }; >>>> match-destinations { localhost; }; >>>> recursion yes; >>>> include "/etc/named.rfc1912.zones"; >>>> }; >>>> view viewx { >>>> include "domainx.zones"; >>>> }; >>>> >>>> >>>> #cat var/domainx.zones >>>> zone "domainx" IN { >>>> type master; >>>> file "domainx.zone"; >>>> allow-update { none; }; >>>> }; >>> Where on the filesystem is your 'domainx.zones' file? >>> >>> According to you 'include "domainx.zones"' it should be >>> '/var/named/domainx.zones', but according to your 'cat var/domainx.zones' >>> it's in some 'var/' subdirectory. >>> >>> Either use the full path for the include or move the domainx.zones file into >>> the /var/named and use a relative path from there. >>> >>> Danilo >>> >>> ___ >>> Please visit https://lists.isc.org/mailman/listinfo/bind-users to >>> unsubscribe from this list >>> >>> bind-users mailing list >>> bind-users@lists.isc.org >>> https://lists.isc.org/mailman/listinfo/bind-users >>> >> ___ >> Please visit https://lists.isc.org/mailman/listinfo/bind-users to