LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Bind9 all *.domain.com reachable, only www.domain.com isn't (https://www.linuxquestions.org/questions/linux-server-73/bind9-all-%2A-domain-com-reachable-only-www-domain-com-isnt-891711/)

TonyDeWittePony 07-14-2011 09:03 AM

Bind9 all *.domain.com reachable, only www.domain.com isn't
 
Hello all!

I have just installed bind on a brand new Ubuntu 10.04 server. I configured it according to several tutorials (and based on my knowledge from the past), but I'm having a strange issue. These are reachable:
domain.com
admin.domain.com
dbadmin.domain.com, etc.
But www.domain.com is not reachable. Pinging it gives an unreachable host.

Here are my config files:

/etc/resolv.conf
Code:

search domain.com
nameserver ns1_ip
nameserver ns2_ip
nameserver dns_isp1
nameserver dns_isp2

/etc/bind/named.conf.options
Code:

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 http://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 {
                dns_isp2;
                dns_isp1;
        };

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
};

/etc/bind/named.conf.local
Code:

//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "domain.com" {
        type master;
        file "/etc/bind/domain.com";
};

zone "reversed_ip.in-addr.arpa" {
        type master;
        notify no;
        file "/etc/bind/reversed_ip";
};

zone "reversed_ns_ip.in-addr.arpa" {
        type master;
        notify no;
        file "/etc/bind/reversed_ns_ip";
};


logging {
    channel query.log {
        file "/var/log/query.log";
        // Set the severity to dynamic to see all the debug messages.
        severity debug 3;
    };

    category queries { query.log; };
};

/etc/bind/reversed_ns_ip
Code:

;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@      IN      SOA    ns1.domain.com. support.domain.com. (i
                  201107141533        ; Serial
                          10800        ; Refresh
                          3600        ; Retry
                        604800        ; Expire
                          86400 )      ; Negative Cache TTL
;
        IN      NS      ns1.domain.com.
        IN      NS      ns2.domain.com.
232    IN      PTR    ns1.domain.com.
233    IN      PTR    ns2.domain.com.

/etc/bind/reversed_ip
Code:

;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@      IN      SOA    ns1.domain.com. support.domain.com. (
                  201107141335        ; Serial
                          10800        ; Refresh
                          3600        ; Retry
                        604800        ; Expire
                          86400 )      ; Negative Cache TTL

256    IN      PTR    domain.com.

/etc/bind/domain.com
Code:

;
; BIND data file for local loopback interface
;
$TTL    86400 ;1 day
@      IN      SOA    ns1.domain.com. support.domain.com. (
                  201107141527        ; Serial
                          10800        ; Refresh
                          3600        ; Retry
                        604800        ; Expire
                          86400 )      ; Negative Cache TTL

        IN      NS      ns1.domain.com.
        IN      NS      ns2.domain.com.

;domain.com. IN A      ip

@      IN      A      ip
ns1    IN      A      ns1_ip
ns2    IN      A      ns2_ip

admin  IN      A      ip
dbadmin IN      A      ip
;test    IN      A      ip
wiki    IN      A      ip
www    IN      A      ip
;www    IN      CNAME  test ;Tests

Does anyone see what's wrong here? It's only the www that doesn't work, all the others do work.



Edit: I just waited it out, and all of a sudden it's fixed now. Looks like I needed to refresh the cache or something.

MensaWater 07-14-2011 01:03 PM

Yes entries are cached often by DNS servers and/or your local machine and/or even your local browser so often have to be cleared or you have to wait for them to die.

If your problem is solved you might want to mark the issue as Solved in Thread Tools at the top of the page.


All times are GMT -5. The time now is 03:19 PM.