Results 1 to 10 of 151

Thread: Howto: Setup a DNS server with bind

Threaded View

  1. #11
    Join Date
    Jan 2011
    Beans
    9

    Re: Howto: Setup a DNS server with bind

    I fixed my problem. I have my domain running I think. The problem is I cannot browse to the my internal site via the new domain name.

    Here are the results of the tests:

    Code:
    ja@x:/etc/apache2$ ping x.local
    PING x.local (127.0.1.1) 56(84) bytes of data.
    64 bytes from x.local (127.0.1.1): icmp_seq=1 ttl=64 time=0.014 ms
    64 bytes from x.local (127.0.1.1): icmp_seq=2 ttl=64 time=0.012 ms
    64 bytes from x.local (127.0.1.1): icmp_seq=3 ttl=64 time=0.012 ms
    64 bytes from x.local (127.0.1.1): icmp_seq=4 ttl=64 time=0.013 ms
    ^C
    --- x.local ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 2998ms
    rtt min/avg/max/mdev = 0.012/0.012/0.014/0.004 ms
    ja@x:/etc/apache2$ dig x.local
    
    ; <<>> DiG 9.7.0-P1 <<>> x.local
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64267
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;x.local.                     IN      A
    
    ;; AUTHORITY SECTION:
    x.local.              38400   IN      SOA     ns1.x.local. admin.x.local. 2010011001 28800 3600 604800 38400
    
    ja@xserv:/etc/apache2$ dig -x 127.0.0.1
    
    ; <<>> DiG 9.7.0-P1 <<>> -x 127.0.0.1
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64924
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2
    
    ;; QUESTION SECTION:
    ;1.0.0.127.in-addr.arpa.                IN      PTR
    
    ;; ANSWER SECTION:
    1.0.0.127.in-addr.arpa. 604800  IN      PTR     localhost.
    
    ;; AUTHORITY SECTION:
    127.in-addr.arpa.       604800  IN      NS      localhost.
    
    ;; ADDITIONAL SECTION:
    localhost.              604800  IN      A       127.0.0.1
    localhost.              604800  IN      AAAA    ::1
    
    ;; Query time: 0 msec
    ;; SERVER: 192.168.2.20#53(192.168.2.20)
    ;; WHEN: Mon Jan 10 20:43:47 2011
    ;; MSG SIZE  rcvd: 121
    
    ja@xserv:/etc/bind$ named-checkzone x.local /etc/bind/zones/x.local.db
    /etc/bind/zones/x.local.db:1: no TTL specified; using SOA MINTTL instead
    zone x.local/IN: loaded serial 2010011001
    OK
    It seems as though I have everything configured correctly, yet I still cannot browse to the site I have hosted off of the nameserver 192.168.2.20. The router ip is 192.168.2.1.

    Here are my files:

    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";
    
    # This is the zone definition. replace example.com with your domain name
    zone "x.local" {
            type master;
            file "/etc/bind/zones/x.local.db";
            };
    
    
    zone "2.168.192.in-addr.arpa" {
         type master;
         file "/etc/bind/zones/rev.2.168.192.in-addr.arpa";
    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 {
                    192.168.2.1;
               };
    
            auth-nxdomain no;    # conform to RFC1035
            listen-on-v6 { any; };
    };
    x.local.db
    Code:
    x.local.      IN      SOA     ns1.x.local. admin.x.local. (
    
                                                            2010011001
                                                            28800
                                                            3600
                                                            604800
                                                            38400
     );
    
    
    
    
    
    x.local.        IN      NS      ns1.x.local.
    www              IN      A       192.168.2.20
    ns1                IN      A       192.168.2.20
    *                   IN      A       192.168.2.20
    rev.2.168.192.in-addr.arpa
    Code:
    @ IN SOA ns1.x.local. admin.x.local. (
                            2010011001;
                            28800;
                            604800;
                            604800;
                            86400
    )
    
                          IN    NS     ns1.x.local.
    20                    IN    PTR    x.local
    resolv.conf
    Code:
    search x.local
    nameserver 192.168.2.20
    Any help would be greatly appreciated. I can't seem to figure out what I am doing wrong.

    Edit: I can browse to the site by putting in the ip address of the nameserver/webhost into my browser.
    Last edited by rededit; January 11th, 2011 at 03:59 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •