Serveur bind

Bonjour,

j'essayes de configurer un serveur dns avec bind,j'ai modifié les fichiers named.conf et db.domaine,mais le service n'est toujours pas activé :

/etc/bind# /etc/init.d/bind9 status
bind9.service - BIND Domain Name Server
Loaded: loaded (/lib/systemd/system/bind9.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2018-01-15 14:01:43 CET; 5s ago
Docs: man:named(8)
Process: 8986 ExecStop=/usr/sbin/rndc stop (code=exited, status=1/FAILURE)
Process: 8961 ExecStart=/usr/sbin/named -f $OPTIONS (code=exited, status=1/FAILURE)
Main PID: 8961 (code=exited, status=1/FAILURE)

Jan 15 14:01:43 named[8961]: adjusted limit on open files from 4096…8576
Jan 15 14:01:43 named[8961]: found 4 CPUs, using 4 worker threads
Jan 15 14:01:43 named[8961]: using 2 UDP listeners per interface
Jan 15 14:01:43 named[8961]: using up to 4096 sockets
Jan 15 14:01:43 named[8961]: loading configuration from '/etc/bind/…onf'
Jan 15 14:01:43 systemd[1]: bind9.service: Main process exited, cod…LURE
Jan 15 14:01:43 rndc[8986]: rndc: connect failed: 127.0.0.1#953: co…used
Jan 15 14:01:43 systemd[1]: bind9.service: Control process exited, …us=1
Jan 15 14:01:43 systemd[1]: bind9.service: Unit entered failed state.
Jan 15 14:01:43 systemd[1]: bind9.service: Failed with result 'exit…de'.

Pouvez vous me dire où est l'erreur ?

5 réponses

  1. quand j'essaye un /etc/init.d/bind9 restart ,voilà ce que j'ai comme logs systeme :

    Jan 15 14:42:24 named[9484]: BIND 9 is maintained by Internet Systems Co nsortium,
    Jan 15 14:42:24 named[9484]: Inc. (ISC), a non-profit 501(c)(3) public-b enefit
    Jan 15 14:42:24 named[9484]: corporation. Support and training for BIND 9 are
    Jan 15 14:42:24 named[9484]: available at https://www.isc.org/support/
    Jan 15 14:42:24 named[9484]: ------------------------------------------- ---------
    Jan 15 14:42:24 named[9484]: adjusted limit on open files from 4096 to 1 048576
    Jan 15 14:42:24 named[9484]: found 4 CPUs, using 4 worker threads
    Jan 15 14:42:24 named[9484]: using 2 UDP listeners per interface
    Jan 15 14:42:24 named[9484]: using up to 4096 sockets
    Jan 15 14:42:24 named[9484]: loading configuration from '/etc/bind/named .conf'
    Jan 15 14:42:24 named[9484]: /etc/bind/named.conf.options:22: expected I P address near 'dnssec-validation'
    Jan 15 14:42:24 named[9484]: loading configuration: unexpected token
    Jan 15 14:42:24 named[9484]: exiting (due to fatal error)
    Jan 15 14:42:24 systemd[1]: bind9.service: Main process exited, code=exi ted, status=1/FAILURE
    Jan 15 14:42:24 rndc[9506]: rndc: connect failed: 127.0.0.1#953: connect ion refused
    Jan 15 14:42:24 systemd[1]: bind9.service: Control process exited, code= exited status=1
    Jan 15 14:42:24 systemd[1]: bind9.service: Unit entered failed state.
    Jan 15 14:42:24 systemd[1]: bind9.service: Fai
    0
    1. Contributeur
      Salut,
      /etc/bind/named.conf.options:22: expected I P address near 'dnssec-validation'
      Y'a une erreur dans ton fichier /etc/bind/named.conf à la ligne 22 apparemment ;-(

      Peux-tu afficher (
      cat -n /etc/bind/named.conf
      ) son contenu s'il te plaît, merci ?
      0
  2. c'est tout ce que j'ai quand je passe la commande :

    cat -n /etc/bind/named.conf
    1 // This is the primary configuration file for the BIND DNS server named.
    2 //
    3 // Please read /usr/share/doc/bind9/README.Debian.gz for information on the
    4 // structure of BIND configuration files in Debian, *BEFORE* you customi ze
    5 // this configuration file.
    6 //
    7 // If you are just adding zones, please do that in /etc/bind/named.conf. local
    8
    9 include "/etc/bind/named.conf.options";
    10 include "/etc/bind/named.conf.local";
    11 include "/etc/bind/named.conf.default-zones";
    12
    root@vds2586:~# cat -n /etc/bind/named.conf
    1 // This is the primary configuration file for the BIND DNS server named.
    2 //
    3 // Please read /usr/share/doc/bind9/README.Debian.gz for information on the
    4 // structure of BIND configuration files in Debian, *BEFORE* you customize
    5 // this configuration file.
    6 //
    7 // If you are just adding zones, please do that in /etc/bind/named.conf.local
    8
    9 include "/etc/bind/named.conf.options";
    10 include "/etc/bind/named.conf.local";
    11 include "/etc/bind/named.conf.default-zones";
    12

    y'a pas de ligne 22 je pense.
    0
    1. Salut,
      les fichiers inclus, ça compte aussi ....
      0
    2. Contributeur
      Oups, au temps pour moi, c'est dans include "/etc/bind/named.conf.options" ;-\
      0
  3. root@:~# nano /etc/bind/named.conf.options
    GNU nano 2.7.4 File: /etc/bind/named.conf.options

    options {
    directory "/var/cache/bind";

    // If there is a firewall between you and nameservers you want
    // to talk to, you may need to fix the firewall to allow multiple
    // ports to talk. See https://www.kb.cert.org/vuls/id/800113/

    // If your ISP provided one or more IP addresses for stable
    // nameservers, you probably want to use them as forwarders.
    // Uncomment the following block, and insert the addresses replacing
    // the all-0's placeholder.

    forwarders {
    8.8.8.8;
    8.8.4.4;
    // };

    //========================================================================
    // If BIND logs error messages about the root key being expired,
    // you will need to update your keys. See https://www.isc.org/bind-keys/
    //========================================================================
    dnssec-validation auto;
    auth-nxdomain no; # conform to RFC1035
    listen-on-v6 { ::1; };
    listen-on {any;};
    allow-recursion { 127.0.0.1; };

    };
    0
    1. Contributeur
      Salut,

      Essaie de changer
      dnssec-validation auto;
      par
      dnssec-validation none;
      …

      Source
      0
    2. Contributeur
      Juste un truc qui me chiffonne dans ta conf :
      forwarders {
      8.8.8.8;
      8.8.4.4;
      // };

      Peux-tu retirer les deux // devant l'accolade fermante, s'il te plaît ;-\
      0
    3. oui bien sur, tout de suite
      0
    4. Contributeur
      @tarekhamOups, je n'avais pas vu que si l'accolade était en commentaire c'est parce que tu avais rajouté le reste et que l'instruction se termine plus loin ;-(

      Donc re-commente la ligne.

      Toutes mes plates.
      0
  4. nonça donne rien, bind n'est toujours pas activé, j'ai toujours ça :

    /etc/init.d/bind9 status
    ● bind9.service - BIND Domain Name Server
    Loaded: loaded (/lib/systemd/system/bind9.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Tue 2018-01-16 09:42:50 CET; 7s ago
    Docs: man:named(8)
    Process: 11813 ExecStop=/usr/sbin/rndc stop (code=exited, status=1/FAILURE)
    Process: 11788 ExecStart=/usr/sbin/named -f $OPTIONS (code=exited, status=1/FAILURE)
    Main PID: 11788 (code=exited, status=1/FAILURE)

    Jan 16 09:42:50 named[11788]: found 4 CPUs, using 4 worker threads
    Jan 16 09:42:50 named[11788]: using 2 UDP listeners per interface
    Jan 16 09:42:50 named[11788]: using up to 4096 sockets
    Jan 16 09:42:50 named[11788]: loading configuration from '/etc/bind…onf'
    Jan 16 09:42:50 named[11788]: /etc/bind/named.conf.options:22: expe…ion'
    Jan 16 09:42:50 systemd[1]: bind9.service: Main process exited, cod…LURE
    Jan 16 09:42:50 rndc[11813]: rndc: connect failed: 127.0.0.1#953: c…used
    Jan 16 09:42:50 systemd[1]: bind9.service: Control process exited, …us=1
    Jan 16 09:42:50 systemd[1]: bind9.service: Unit entered failed state.
    Jan 16 09:42:50 systemd[1]: bind9.service: Failed with result 'exit…de'.
    Hint: Some lines were ellipsized, use -l to show in full.
    0
    1. voici les logs systeme :

      Jan 16 09:42:50 named[11788]: BIND 9 is maintained by Internet Systems C onsortium,
      Jan 16 09:42:50 named[11788]: Inc. (ISC), a non-profit 501(c)(3) public- benefit
      Jan 16 09:42:50 named[11788]: corporation. Support and training for BIN D 9 are
      Jan 16 09:42:50 named[11788]: available at https://www.isc.org/support/
      Jan 16 09:42:50 named[11788]: ------------------------------------------ ----------
      Jan 16 09:42:50 named[11788]: adjusted limit on open files from 4096 to 1048576
      Jan 16 09:42:50 named[11788]: found 4 CPUs, using 4 worker threads
      Jan 16 09:42:50 named[11788]: using 2 UDP listeners per interface
      Jan 16 09:42:50 named[11788]: using up to 4096 sockets
      Jan 16 09:42:50 named[11788]: loading configuration from '/etc/bind/name d.conf'
      Jan 16 09:42:50 named[11788]: /etc/bind/named.conf.options:22: expected IP address near 'dnssec-validation'
      Jan 16 09:42:50 named[11788]: loading configuration: unexpected token
      Jan 16 09:42:50 named[11788]: exiting (due to fatal error)
      Jan 16 09:42:50 systemd[1]: bind9.service: Main process exited, code=exi ted, status=1/FAILURE
      Jan 16 09:42:50 rndc[11813]: rndc: connect failed: 127.0.0.1#953: connec tion refused
      Jan 16 09:42:50 systemd[1]: bind9.service: Control process exited, code= exited status=1
      Jan 16 09:42:50 systemd[1]: bind9.service: Unit entered failed state.
      Jan 16 09:42:50 systemd[1]: bind9.service: Failed with result 'exit-code '.
      Jan 16 09:45:01 CRON[11847]: (root) CMD (command -v debian-sa1 > /dev/nu ll && debian-sa1 1 1)
      0