Seite 1 von 2 12 LetzteLetzte
Ergebnis 1 bis 10 von 15
  1. #1
    Erfahrener Benutzer
    Registriert seit
    09.07.2012
    Ort
    Spanien
    Beiträge
    273

    DNS query fails

    When 10.0.0.164 is the ip address of the bind server and domain.com is configured in LC with "Own DNS server" with a valid DNS template, then I correctly see in /etc/bind/zones.liveconfig:
    Code:
    zone "domain.com" {
    	type master;
    	file "/var/lib/bind/domain.com.db";
    	update-policy { grant LiveConfig. subdomain domain.com. ANY; };
    };
    ... and /var/lib/bind/domain.com.db:
    Code:
    ;  _    _          ___           __ _     (R)
    ; | |  (_)_ _____ / __|___ _ _  / _(_)__ _
    ; | |__| \ V / -_) (__/ _ \ ' \|  _| / _` |
    ; |____|_|\_/\___|\___\___/_||_|_| |_\__, |
    ;                                    |___/
    ; Copyright (c) 2009-2013 Keppler IT GmbH.
    ; ----------------------------------------------------------------------------
    ; Created at: 2013-12-04 12:01:22 CET
    
    $ORIGIN .
    domain.com	86400	IN SOA	ns1.domain.com. dr.domain.com. (
    				2013120401	; serial
    				86400	; refresh
    				7200	; retry
    				1209600	; expire
    				3600	; minimum (neg. TTL)
    				)
    $ORIGIN domain.com.
    dev		10800	IN A	10.0.0.164
    www		10800	IN A	10.0.0.164
    		10800	IN NS	ns1.domain.com.
    		10800	IN MX	10 mail.domain.com.
    		10800	IN A	10.0.0.164
    ; <EOF>
    ... but still the dig command will return:

    Code:
    root@ziba200:/var/lib/bind# dig @10.0.0.164 domain.com
    
    ; <<>> DiG 9.7.3 <<>> @10.0.0.164 domain.com
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 43908
    ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
    ;; WARNING: recursion requested but not available
    
    ;; QUESTION SECTION:
    ;domain.com.                 IN      A
    
    ;; Query time: 0 msec
    ;; SERVER: 10.0.0.164#53(10.0.0.164)
    ;; WHEN: Wed Dec  4 12:09:30 2013
    ;; MSG SIZE  rcvd: 31
    Why is it failing? What is missing?

  2. #2
    LiveConfig-Team Avatar von kk
    Registriert seit
    10.12.2010
    Beiträge
    3.211
    At a first glance, the configuration looks valid.
    Please connect to your server via SSH and - as root user - issue the command "rndc reload domain.com". You then should see some log messages in /var/log/messages or /var/log/syslog if and why the zone was rejected by BIND.

  3. #3
    Erfahrener Benutzer
    Registriert seit
    09.07.2012
    Ort
    Spanien
    Beiträge
    273
    I tried something else I found in this thread:

    Code:
    /usr/sbin/named-checkzone domain.com.db /var/lib/bind/domain.com.db
    /var/lib/bind/domain.com.db:11: ignoring out-of-zone data (domain.com)
    /var/lib/bind/domain.com.db:19: ignoring out-of-zone data (dev.domain.com)
    /var/lib/bind/domain.com.db:20: ignoring out-of-zone data (www.domain.com)
    zone domain.com.db/IN: has 0 SOA records
    zone domain.com.db/IN: has no NS records
    zone domain.com.db/IN: not loaded due to errors.

  4. #4
    LiveConfig-Team Avatar von kk
    Registriert seit
    10.12.2010
    Beiträge
    3.211
    Ok, found it: the sort order of the resource records within the zone file is wrong (the records without a host part (NS, MX) must appear before the other records (dev, www).
    We'll fix this immediately (we'll have to check where this wrong sort order comes from - maybe it depends on the database locale).

  5. #5
    LiveConfig-Team Avatar von kk
    Registriert seit
    10.12.2010
    Beiträge
    3.211
    Hmm, I've just tested this with both SQLite and MySQL as database backend for LiveConfig, and in both cases my zone files were correct.
    Which database do you use as backend?

  6. #6
    LiveConfig-Team Avatar von kk
    Registriert seit
    10.12.2010
    Beiträge
    3.211
    Please edit the file /usr/lib/liveconfig/lua/bind.lua and remove the two comment dashes from line 604:
    Code:
    table.sort(data.rr)
    Then restart LiveConfig, delete your domain and add it again. Then please check if the zone is valid now.

    The behaviour is really strange, as LiveConfig indeed sends the NS records first, but your zone file proves that they "arrive" in a wrong order - without any resorting in between! However, LiveConfig often uses standard structures (eg. arrays from C++ STL), I assume that the different behaviour is hidden here anywhere...

  7. #7
    Erfahrener Benutzer
    Registriert seit
    09.07.2012
    Ort
    Spanien
    Beiträge
    273
    Backend is SQLite. I did the change in bind.lua, restarted and switched to external dns and back again. Same result:
    Code:
    ;  _    _          ___           __ _     (R)
    ; | |  (_)_ _____ / __|___ _ _  / _(_)__ _
    ; | |__| \ V / -_) (__/ _ \ ' \|  _| / _` |
    ; |____|_|\_/\___|\___\___/_||_|_| |_\__, |
    ;                                    |___/
    ; Copyright (c) 2009-2013 Keppler IT GmbH.
    ; ----------------------------------------------------------------------------
    ; Created at: 2013-12-05 13:41:22 CET
    
    $ORIGIN .
    domain.com      86400   IN SOA  ns1.domain.com. dr.domain.com. (
                                    2013120501      ; serial
                                    86400   ; refresh
                                    7200    ; retry
                                    1209600 ; expire
                                    3600    ; minimum (neg. TTL)
                                    )
    $ORIGIN domain.com.
    dev             10800   IN A    10.0.0.164
    www             10800   IN A    10.0.0.164
                    10800   IN NS   ns1.domain.com.
                    10800   IN MX   10 mail.domain.com.
                    10800   IN A    10.0.0.164
    ; <EOF>

  8. #8
    LiveConfig-Team Avatar von kk
    Registriert seit
    10.12.2010
    Beiträge
    3.211
    Which linux distribution do you use? If Debian/Ubuntu: 32 or 64 bit?
    Thanks!

  9. #9
    Erfahrener Benutzer
    Registriert seit
    09.07.2012
    Ort
    Spanien
    Beiträge
    273
    Ubuntu 11.10 64 bits

  10. #10
    LiveConfig-Team Avatar von kk
    Registriert seit
    10.12.2010
    Beiträge
    3.211
    If you like, you can try this: open or create /usr/lib/liveconfig/lua/custom.lua and add the following line:
    Code:
    os.setlocale("C")
    This will (re)set the default sort order, which might also affect the Lua part.
    Then please restart LiveConfig, and delete/add your zone again.

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •