Hi Guys,
First time installing and configuring bind and it's not working correctly.
Please find below me conf files:
/etc/named.conf:
Code:
// vim:set ts=4 sw=4 et:
options {
directory "/var/named";
pid-file "/run/named/named.pid";
// Uncomment these to enable IPv6 connections support
// IPv4 will still work:
// listen-on-v6 { any; };
// Add this for no IPv4:
// listen-on { none; };
allow-recursion { 127.0.0.1; 192.168.43.0/24; };
allow-transfer { none; };
allow-update { none; };
listen-on { 127.0.0.1; };
forwarders { 8.8.8.8; 8.8.4.4; };
version none;
hostname none;
server-id none;
};
zone "localhost" IN {
type master;
file "localhost.zone";
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "127.0.0.zone";
};
zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" {
type master;
file "localhost.ip6.zone";
};
zone "255.in-addr.arpa" IN {
type master;
file "empty.zone";
};
zone "0.in-addr.arpa" IN {
type master;
file "empty.zone";
};
zone "." IN {
type hint;
file "root.hint";
};
//zone "example.org" IN {
// type slave;
// file "example.zone";
// masters {
// 192.168.1.100;
// };
// allow-query { any; };
// allow-transfer { any; };
// cata.local
zone "cata.example" IN {
type master;
file "cata.example";
allow-update { none; };
allow-query { any; };
allow-transfer { any; };
};
zone "43.168.192.in-addr.arpa" IN {
type master;
file "reverse-192.168.43";
allow-update { none; };
};
/var/named/cata.example:
Code:
; Zone File for "example.com" - Internal Use ONLY
;
$TTL 1D
@ IN SOA galaxy.cata.example. sysadmin.cata.example. (
10 ; Serial
8H ; Refresh
2H ; Retry
4W ; Expire
1D ) ; Minimum
;
IN NS galaxy.cata.example. ; Name Server for the domain
IN MX 10 galaxy.cata.example. ; Mail Exchange
;
cata.example. IN A 192.168.43.21 ; IP address for the domain 'example.com'
galaxy IN A 192.168.43.21 ; IP address for 'galaxy'
www IN CNAME galaxy ; 'galaxy' is also known as www
ftp IN CNAME galaxy ; 'galaxy' is also known as ftp
;
catamac IN A 192.168.43.73 ; MANUAL IP address entry for 'wkstn1'
;wkstn2 IN A 192.168.1.202 ; MANUAL IP address entry for 'wkstn2'
~
/var/named/reverse-192.168.43:
Code:
; Reverse File for network "192.168.43.0/24" - Internal ONLY
;
$TTL 1D
@ IN SOA galaxy.cata.example. sysadmin.cata.example. (
10 ; Serial
8H ; Refresh
2H ; Retry
4W ; Expire
1D ) ; Minimum
;
IN NS galaxy.cata.example.
;galaxy.cata.dia. IN A 192.168.43.21
21 IN PTR galaxy.cata.example.
;
73 IN PTR catamac.cata.example. ; MANUAL entry for 'cata_mac' reverse delegation
;202 IN PTR wkstn2.example.com. ; MANUAL entry for 'wkstn2' reverse delegation
When I ran 'dig
www.cata.example'
Code:
; <<>> DiG 9.14.1 <<>> www.cata.example
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36279
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1280
;; QUESTION SECTION:
;www.cata.example. IN A
;; ANSWER SECTION:
www.cata.example. 0 IN A 86.35.3.191
www.cata.example. 0 IN A 86.35.3.190
;; Query time: 49 msec
;; SERVER: 192.168.43.1#53(192.168.43.1)
;; WHEN: Thu May 16 19:11:39 EEST 2019
;; MSG SIZE rcvd: 77
These IPs are incorrect:
www.cata.example. 0 IN A 86.35.3.191 <---
www.cata.example. 0 IN A 86.35.3.190 <---
Code:
systemctl restart systemd-resolved.service
[root@cataarch ~]# nslookup galaxy.cata.example
Server: 192.168.43.1
Address: 192.168.43.1#53
** server can't find galaxy.cata.example: NXDOMAIN
[root@cataarch ~]# nslookup galaxy.cata.example
Server: 192.168.43.1
Address: 192.168.43.1#53
** server can't find galaxy.cata.example: NXDOMAIN
Could you please help me with this issue, I have no experience with it and I am clueless now.
Thank You,
Catalin