Bind9 127.0.0.1#953 impossible de résoudre

Bonsoir,
J’ai installé Bind9 ce soir avec un magnifique : aptitude install bind9 en m’inspirant de cette page : http://www.vanaryon.tk/2010/02/resolution-dns-faites-la-maison/
Malheureusement la résolution ne fonctionne pas.
iptables est configuré pour tout laisser sortir par défaut. Le 53 est ouvert dans les deux sens sur ma box. Néanmoins, ça ne fonctionne pas.

/etc/init.d/bind9 restart Stopping domain name service...: bind9rndc: connect failed: 127.0.0.1#953: timed out Starting domain name service...: bind9.

Au niveau des logs ça donne ça :

Feb 9 00:55:22 ranma named[32422]: starting BIND 9.5.1-P3 -u bind Feb 9 00:55:22 ranma named[32422]: found 1 CPU, using 1 worker thread Feb 9 00:55:22 ranma named[32422]: using up to 4096 sockets Feb 9 00:55:22 ranma named[32422]: loading configuration from '/etc/bind/named.conf' Feb 9 00:55:22 ranma named[32422]: max open files (1024) is smaller than max sockets (4096) Feb 9 00:55:22 ranma named[32422]: using default UDP/IPv4 port range: [1024, 65535] Feb 9 00:55:22 ranma named[32422]: using default UDP/IPv6 port range: [1024, 65535] Feb 9 00:55:22 ranma named[32422]: listening on IPv6 interfaces, port 53 Feb 9 00:55:22 ranma named[32422]: listening on IPv4 interface eth0, 192.168.1.12#53 Feb 9 00:55:22 ranma named[32422]: automatic empty zone: 254.169.IN-ADDR.ARPA Feb 9 00:55:22 ranma named[32422]: automatic empty zone: 2.0.192.IN-ADDR.ARPA Feb 9 00:55:22 ranma named[32422]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA Feb 9 00:55:22 ranma named[32422]: automatic empty zone: 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA Feb 9 00:55:22 ranma named[32422]: automatic empty zone: 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA Feb 9 00:55:22 ranma named[32422]: automatic empty zone: D.F.IP6.ARPA Feb 9 00:55:22 ranma named[32422]: automatic empty zone: 8.E.F.IP6.ARPA Feb 9 00:55:22 ranma named[32422]: automatic empty zone: 9.E.F.IP6.ARPA Feb 9 00:55:22 ranma named[32422]: automatic empty zone: A.E.F.IP6.ARPA Feb 9 00:55:22 ranma named[32422]: automatic empty zone: B.E.F.IP6.ARPA Feb 9 00:55:22 ranma named[32422]: couldn't add command channel 127.0.0.1#953: address not available Feb 9 00:55:22 ranma named[32422]: couldn't add command channel ::1#953: address not available Feb 9 00:55:22 ranma named[32422]: zone 0.in-addr.arpa/IN: loaded serial 1 Feb 9 00:55:22 ranma named[32422]: zone 127.in-addr.arpa/IN: loaded serial 1 Feb 9 00:55:22 ranma named[32422]: zone 255.in-addr.arpa/IN: loaded serial 1 Feb 9 00:55:22 ranma named[32422]: zone localhost/IN: loaded serial 2 Feb 9 00:55:22 ranma named[32422]: running

Je ne vois pas comment corriger ça … une piste ?

Petit up mal déguisé : ma version de Debian est Lenny

Bonsoir,

je vais peut être dire une grosse connerie, mais vu que je vois que tu utilises Iptables et qu’il y a un message d’erreur sur le loopback bind9rndc: connect failed: 127.0.0.1#953: es-tu sur d’autoriser les connexions sur celui-ci dans Iptables avec un #iptables -A INPUT -i lo -j ACCEPT ?

Que donne un netstat -tpl??

netstat -tpl

Connexions Internet actives (seulement serveurs)
Proto Recv-Q Send-Q Adresse locale Adresse distante Etat PID/Program name
tcp 0 0 :sunrpc : LISTEN 2359/portmap
tcp 0 0 192.168.1.12:domain : LISTEN 32422/named
tcp 0 0 :ssh : LISTEN 16615/sshd
tcp 0 0 localhost:ipp : LISTEN 3320/cupsd
tcp 0 0 localhost:omniorb : LISTEN 2961/python
tcp 0 0 localhost:postgresql : LISTEN 2798/postgres
tcp6 0 0 [::]:domain [::]:
LISTEN 32422/named
tcp6 0 0 [::]:ssh [::]:
LISTEN 16615/sshd

sinon j’ai fait :

iptables -A INPUT -i lo -j ACCEPT

Pas de changement. Ça ne résoud toujours pas, j’ai redémarré bind par acquis de conscience, il met mille ans à exécuter la commande et en l’interrompant j’obtiens :

/etc/init.d/bind9 restart

Stopping domain name service…: bind9^Crndc: connect failed: 127.0.0.1#953: operation canceled

Ton serveur écoute pourtant, que donne

$ dig @127.0.0.1 www.google.fr

$ dig @127.0.0.1 google.fr

; <<>> DiG 9.5.1-P3 <<>> @127.0.0.1 google.fr
; (1 server found)
;; global options: printcmd
;; connection timed out; no servers could be reached

Je m’arrache les cheveux, pas moyen de joindre 127.0.0.1 !!!
En redémarrant bind après l’avoir tué (stop il écoute pas sans mauvais jeu de mot), j’ai encore les logs qui indiquent la même chose.

Feb 9 21:22:32 ranma named[30781]: couldn’t add command channel 127.0.0.1#953: address not available
Feb 9 21:22:32 ranma named[30781]: couldn’t add command channel ::1#953: address not available

C’est peut être dû à mon iptables … je ne vois pas où je fais une erreur pourtant :

[code]# iptables -v -L
Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all – lo any anywhere anywhere
0 0 ACCEPT icmp – any any anywhere anywhere
49 5976 ACCEPT all – any any anywhere anywhere state RELATED,ESTABLISHED
0 0 ACCEPT tcp – any any anywhere anywhere tcp dpt:domain
0 0 ACCEPT udp – any any anywhere anywhere udp dpt:domain
0 0 LOG all – any any anywhere anywhere LOG level warning prefix `paquet IPv4 inattendu '
0 0 REJECT all – any any anywhere anywhere reject-with icmp-port-unreachable

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 70 packets, 11726 bytes)
pkts bytes target prot opt in out source destination

[/code]

voilà les règles iptables à chaque fois :

-P INPUT DROP -P FORWARD ACCEPT -P OUTPUT ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -p tcp --dport 53 -j ACCEPT -A INPUT -p udp --dport 53 -j ACCEPT -A INPUT -j LOG --log-prefix "paquet IPv4 inattendu " -A INPUT -j REJECT COMMIT

C’est sûrement un détail stupide mais je le vois pas…

Je sais

[quote]tcp 0 0 192.168.1.12:domain : LISTEN 32422/named [/quote]Il écoute sur eth0 mais pas sur l’interface loopback. Essaye un dig @192.168.1.12

Montre ton named.ocnf

named.conf j’y ai pas touché

[code]// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, BEFORE you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

include “/etc/bind/named.conf.options”;

// prime the server with knowledge of the root servers
zone “.” {
type hint;
file “/etc/bind/db.root”;
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone “localhost” {
type master;
file “/etc/bind/db.local”;
};

zone “127.in-addr.arpa” {
type master;
file “/etc/bind/db.127”;
};

zone “0.in-addr.arpa” {
type master;
file “/etc/bind/db.0”;
};

zone “255.in-addr.arpa” {
type master;
file “/etc/bind/db.255”;
};

include “/etc/bind/named.conf.local”;[/code]

par contre 192.168.1.12, c l’ip locale d’une autre machine qui me sert de serveur de blog entre autre. je sais pas pourquoi elle aparait plus haut .

dig @192.168.1.12 www.google.fr

; <<>> DiG 9.5.1-P3 <<>> @192.168.1.12 www.google.fr
; (1 server found)
;; global options: printcmd
;; connection timed out; no servers could be reached

donc sur cette adresse normal, pas de bind installé

Feb 11 19:45:58.660 [notice] Opening Socks listener on 127.0.0.1:9050 Feb 11 19:45:58.660 [warn] Could not bind to 127.0.0.1:9050: Cannot assign requested address Feb 11 19:45:58.660 [warn] Failed to parse/validate config: Failed to bind one of the listener ports. Feb 11 19:45:58.660 [err] Reading config failed--see warnings above.
même souci pour installer tor, marche pô

Dis moi tu as une interface loopback???

Essaye avec

ifconfig lo 127.0.0.1 up

puis tu relances le serveur DNS…

Merci beaucoup!!!

tor et bind9 se sont installés sans problème du coup. ça marche :

[code]dig debian-fr.org

; <<>> DiG 9.5.1-P3 <<>> debian-fr.org
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51117
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;debian-fr.org. IN A

;; ANSWER SECTION:
debian-fr.org. 38393 IN A 213.41.240.205

;; AUTHORITY SECTION:
debian-fr.org. 38393 IN NS ns0.asyd.net.
debian-fr.org. 38393 IN NS ns1.asyd.net.

;; ADDITIONAL SECTION:
ns0.asyd.net. 172611 IN A 81.93.247.137
ns1.asyd.net. 172611 IN A 88.191.25.81

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Feb 11 20:34:33 2010
;; MSG SIZE rcvd: 123
[/code]

Question subsidiaire : comme ça se fait que 127.0.0.1 était désactivée sans que je m’en rende compte ? ça survivra à un reboot ?

Quel est ton fichier /etc/network/interfaces ??

[code]# This file describes the network interfaces available on your system

and how to activate them. For more information, see interfaces(5).

The loopback network interface

auto lo
iface lo inet loopback

The primary network interface

allow-hotplug eth0

iface eth0 inet dhcp

auto eth0[/code]

bizarre, lo aurait du être là…