Ubuntu 12: BIND issue

Discussion in 'Server Operation' started by amplex, Jan 27, 2013.

  1. amplex

    amplex New Member

    I have been working on this issue on my ubuntu server 12 vm for hours. I got the zone file to read correctly by named earlier in the day then changed some syntax somewhere and could not figure out the issue so I used a web based PHP zone file creator and just plugged in a hosts file. This works, except for the raw domain itself. Other domains seem to work fine with nslookup such as google.com, amazon.com, etc.

    I have a domain that has been pointed to my IP for months. I have no problem looking it up from anywhere, but the DNS on my server is not working 100%. I can query nslookup for all hosts on my domain (www.example.com, mail.example.com, etc), except I cannot query for the domain itself (example.com). Reverse DNS works fine as well. The last line is the one I added which doesnt specify a host but I thought might help resolve example.com without a hostname.



    Here is the contents of my domain's zone file:

    ; BIND db file for example.com

    $TTL 86400

    @ IN SOA lateralus.example.com. amplex.example.com. (
    2013012702 ; serial number YYMMDDNN
    28800 ; Refresh
    7200 ; Retry
    864000 ; Expire
    86400 ; Min TTL
    )

    NS lateralus.example.com.

    MX 10 mail.example.com.


    $ORIGIN example.com.

    lateralus IN A 192.168.2.22
    gw IN A 192.168.2.1
    mail IN A 192.168.2.5

    www IN CNAME lateralus
    IN CNAME lateralus


    Here is the output from nslookup:

    root@lateralus:/etc/bind/zones# nslookup example.com
    Server: 127.0.0.1
    Address: 127.0.0.1#53

    *** Can't find example.com: No answer

    root@lateralus:/etc/bind/zones# nslookup www.example.com
    Server: 127.0.0.1
    Address: 127.0.0.1#53

    www.example.com canonical name = lateralus.example.com.
    Name: lateralus.example.com
    Address: 192.168.2.22
     

Share This Page