LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Bind (DNS) cannot resolve name [CENTOS+NAMED] (https://www.linuxquestions.org/questions/linux-server-73/bind-dns-cannot-resolve-name-%5Bcentos-named%5D-4175519987/)

ratedam 09-24-2014 09:53 PM

Bind (DNS) cannot resolve name [CENTOS+NAMED]
 
Good evening,

I'm currently trying to configure bind so that i can setup a dns server which i haven't been able to. I'm currently using VirtualBox with 2 network interfaces.
Bridge: 192.168.1.100
intnet: 192.168.20.254

Here are my configurations:

/etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.1.100 torvalds.marques.linus

/etc/resolv.conf
search marques.linus
nameserver 192.168.1.100

/etc/named.conf
options {
# listen-on port 53 { any; };
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 yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};

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

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

zone "marques.linus" IN {
type master;
file "/var/named/marques.linus.db";
allow-update { none; };
};

zone "1.168.192.in-addr.arpa" IN {
type master;
file "reverse.marques.linus";
allow-update { none; };
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";


ZONE marques.linus
$TTL 1D
@ IN SOA torvalds.marques.linus. webmaster.marques.linus. (
10 ; Serial number
1D ; tempo de refresh
1H ; tempo de retry
1W ; quanto tempo vai fazer o retry
3H ) ; tempo minimo para armazenamento na cache

IN NS torvalds.marques.linus.
torvalds IN A 192.168.1.100


REVERSED ZONE:
$TTL 1D
1.168.192.in-addr.arpa. IN SOA torvalds.marques.linus. webmaster.marques.linus. (
2011071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)

IN NS torvalds.marques.linus.
@ IN PTR marques.linus.

torvalds IN A 192.168.1.100
100 IN PTR torvalds.marques.linus.


DIG RESULTS:
[root@localhost ~]# dig torvalds.marques.linus

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.23.rc1.el6_5.1 <<>> torvalds.marques.linus
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 458
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;torvalds.marques.linus. IN A

;; Query time: 4 msec
;; SERVER: 192.168.1.100#53(192.168.1.100)
;; WHEN: Thu Sep 25 04:36:48 2014
;; MSG SIZE rcvd: 40


Named preconfigured tests:

[root@localhost ~]# named-checkconf /etc/named.conf
[root@localhost ~]# named-checkzone marques.linus /var/named/marques.linus.db
zone marques.linus/IN: loaded serial 10
OK
[root@localhost ~]# named-checkzone marques.linus /var/named/reverse.marques.linus
/var/named/reverse.marques.linus:3: ignoring out-of-zone data (1.168.192.in-addr.arpa)
zone marques.linus/IN: has 0 SOA records
zone marques.linus/IN: has no NS records
zone marques.linus/IN: not loaded due to errors.



Anyone can give me a hunch why this doesn't work? Thanks!





NOTES: for learning purposes my firewall is down.

bitsource 09-26-2014 08:53 PM

easier to set up with webmin: http://www.serverpronto.com/kb/page....S+Using+Webmin

don't forget to point forwarding to outside DNS servers like 8.8.8.8, 8.8.4.4 for google, or opendns, or your ISP's

EDIT: set up caching, too: https://www.digitalocean.com/communi...n-ubuntu-14-04


All times are GMT -5. The time now is 02:40 PM.