-1

I am trying to get up and running my own DNS server but something is wrong. I do not get any error but when I access to www.example.org the page is not loaded. I am using Linux.

  1. My registered domain: example.org
  2. Bind installed on fedora machine with a dynamic public ip and addressed by dns mybind.no-ip.biz
  3. A web server running on another public machine with a static ip: 47.165.250.198

What I am trying to achieve is to configure my own DNS to forward example.org to the web server. In example.org I set only one nameserver: ns1.example.org Here my configuration for bind.

/etc/named.conf 

options { 
        directory       "/var/named"; 
        dump-file       "/var/named/data/cache_dump.db"; 
        statistics-file "/var/named/data/named_stats.txt"; 
        memstatistics-file "/var/named/data/named_mem_stats.txt"; 
        allow-query {any;}; 
        recursion no; 
        auth-nxdomain no; 
}; 

logging { 
        channel default_debug { 
                file "data/named.run"; 
                severity dynamic; 
        }; 
}; 

zone "." IN { 
        type hint; 
        file "named.ca"; 
}; 

zone "example.org" IN { 
        type master; 
        file "/etc/example.org.db"; 
        allow-update { none; }; 
}; 


/etc/example.org.db 

$ttl 1800 
@       IN      SOA     example.org. [email protected]. ( 
                        1111111111      ;Serial 
                        600             ;Refresh 
                        60              ;Retry 
                        86400           ;Expire 
                        300             ;Minimum 
) 
;Nameservers 
         IN     NS              ns1.example.org. 

;Resolve Nameserver IPs 
ns1     IN      A       47.165.250.198 

;Define hosts resolutions 
@       IN      A       47.165.250.198 
smtp    IN      A       47.165.250.198 

;MX records 
example.org.     IN      MX      10      smtp.example.org. 

;CNAMEs 
www.example.org     IN      A 47.165.250.198  

Is my configuration ok?

1

1 Answer 1

1

you have one error

www.example.org     IN      A 47.165.250.198  

That can be

www     IN      A 47.165.250.198  

If you don't end the first section with a . it will append .example.org so if your config the host was www.example.org.example.org

You could also do

 www.example.org.     IN      A 47.165.250.198  
1
  • I changed www.example.org with www but still get server not found from browser. /var/log/messages reports: named[30349]: the working directory is not writable.
    – luk2014
    Sep 23, 2014 at 11:53

Not the answer you're looking for? Browse other questions tagged .