URL: https://linuxfr.org/forums/linux-general/posts/serveur-dns-pb-de-resolution-sans-nom-du-domaine Title: Serveur DNS, pb de résolution sans nom du domaine Authors: zaft Date: 2015年08月18日T13:46:17+02:00 License: CC By-SA Tags: selinux Score: 0 Bonjour, J'ai un souci avec mon serveur DNS. Je suis sous Centos 7. Lorsque je demande au dns le serveur "pxe", il refuse (selon les logs il ne le trouve pas). Je suis contraint de préciser le domaine complet, mais cela alourdi considérablement la syntax. Il existe forcément un moyen de ne pas avoir à donner le nom complet, mais je pèche. ```sh [root@dnsmaster named]# dig pxe.sphenclust.local. ; <> DiG 9.9.4-RedHat-9.9.4-18.el7 <> pxe.sphenclust.local. ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23554 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2 ;; WARNING: recursion requested but not available ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;pxe.sphenclust.local. IN A ;; ANSWER SECTION: pxe.sphenclust.local. 86400 IN A 10.0.0.4 ;; AUTHORITY SECTION: sphenclust.local. 86400 IN NS dnsmaster.sphenclust.local. ;; ADDITIONAL SECTION: dnsmaster.sphenclust.local. 86400 IN A 10.0.0.5 ;; Query time: 0 msec ;; SERVER: 10.0.0.5#53(10.0.0.5) ;; WHEN: mar. août 18 10:36:59 CEST 2015 ;; MSG SIZE rcvd: 105 [root@dnsmaster named]# dig pxe ; <> DiG 9.9.4-RedHat-9.9.4-18.el7 <> pxe ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 48545 ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1 ;; WARNING: recursion requested but not available ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;pxe. IN A ;; Query time: 0 msec ;; SERVER: 10.0.0.5#53(10.0.0.5) ;; WHEN: mar. août 18 10:37:01 CEST 2015 ;; MSG SIZE rcvd: 32 ``` Et mes fichiers de conf : ```sh [root@dnsmaster named]# cat /etc/named.conf // // named.conf // // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS // server as a caching only nameserver (as a localhost DNS resolver only). // // See /usr/share/doc/bind*/sample/ for example named configuration files. // options { listen-on port 53 { 127.0.0.1; 10.0.0.5;}; 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"; allow-query { localhost; 10.0.0.0/24;}; /* - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion. - If you are building a RECURSIVE (caching) DNS server, you need to enable recursion. - If your recursive DNS server has a public IP address, you MUST enable access control to limit queries to your legitimate users. Failing to do so will cause your server to become part of large scale DNS amplification attacks. Implementing BCP38 within your network would greatly reduce such attack surface */ recursion no; dnssec-enable yes; dnssec-validation yes; dnssec-lookaside auto; /* Path to ISC DLV key */ bindkeys-file "/etc/named.iscdlv.key"; managed-keys-directory "/var/named/dynamic"; pid-file "/run/named/named.pid"; session-keyfile "/run/named/session.key"; }; logging { channel default_debug { file "data/named.run"; severity dynamic; }; }; zone "." IN { type hint; file "named.ca"; }; zone"sphenclust.local." IN { type master; file "forward"; allow-update { none; }; }; zone"0.0.10.in-addr.arpa" IN { type master; file "reverse"; allow-update { none; }; }; include "/etc/named.rfc1912.zones"; include "/etc/named.root.key"; [root@dnsmaster named]# cat /var/named/forward $TTL 86400 @ IN SOA dnsmaster.sphenclust.local. root.sphenclust.local. ( 2011071001 ;Serial 3600 ;Refresh 1800 ;Retry 604800 ;Expire 86400 ;Minimum TTL ) @ IN NS dnsmaster.sphenclust.local. @ IN A 10.0.0.5 dnsmaster IN A 10.0.0.5 ansiblemaster IN A 10.0.0.1 repo IN A 10.0.0.2 dhcp IN A 10.0.0.3 pxe IN A 10.0.0.4 slurmctld IN A 10.0.0.6 nfs1 IN A 10.0.0.7 login1 IN A 10.0.0.9 node1 IN A 10.0.0.11 node2 IN A 10.0.0.12 node3 IN A 10.0.0.13 node4 IN A 10.0.0.14 node5 IN A 10.0.0.15 [root@dnsmaster named]# cat /var/named/reverse $TTL 86400 @ IN SOA dnsmaster.sphenclust.local. root.sphenclust.local. ( 2011071001 ;Serial 3600 ;Refresh 1800 ;Retry 604800 ;Expire 86400 ;Minimum TTL ) @ IN NS dnsmaster.sphenclust.local. dnsmaster IN A 10.0.0.5 5 IN PTR dnsmaster.sphenclust.local. 1 IN PTR ansiblemaster.sphenclust.local. 2 IN PTR repo.sphenclust.local. 3 IN PTR dhcp.sphenclust.local. 4 IN PTR pxe.sphenclust.local. 6 IN PTR slurmctld.sphenclust.local. 7 IN PTR nfs1.sphenclust.local. 9 IN PTR login1.sphenclust.local. 11 IN PTR node1.sphenclust.local. 12 IN PTR node2.sphenclust.local. 13 IN PTR node3.sphenclust.local. 14 IN PTR node4.sphenclust.local. 15 IN PTR node5.sphenclust.local. ``` A noter que le parefeu est coupé, et que selinux est en permissive. Dans le fichier /etc/resolv.conf : ```sh [root@dnsmaster named]# cat /etc/resolv.conf nameserver 10.0.0.5 ``` Si vous avez une idée, je suis preneur :-) (PS : désolé pour la mise en forme, ca bug un peu...) Zaft

AltStyle によって変換されたページ (->オリジナル) /