Then how can I show?
I followed that one.
I edited the named.conf:
Code: Select all
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// See the BIND Administrator's Reference Manual (ARM) for details about the
// configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html
options {
listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
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; };
/*
- If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
- If you are building a RECURSIVE (caching) DNS server, you need to enable
recursion.
- If your recursive DNS server has a public IP address, you MUST enable access
control to limit queries to your legitimate users. Failing to do so will
cause your server to become part of large scale DNS amplification
attacks. Implementing BCP38 within your network would greatly
reduce such attack surface
*/
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type forward;
forward only;
forwarders { 8.8.8.8;8.8.4.4; };
zone "mateuscentos7.hopto.org" IN {
type master;
file "mateuscentos7.hopto.org";
allow-update { none; };
};
#zone "." IN {
# type hint;
# file "named.ca";
#};
zone "1.1.10.in-addr.arpa" IN {
type master;
file "1.1.10.in-addr.arpa.ns";
allow-update { none; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
Then I created the zone file:
Code: Select all
;
; Addresses and other host information.
;
@ IN SOA mateuscentos7.hopto.org. hostmaster.mateuscentos7.hopto.org. (
10119 ; Serial
43200 ; Refresh
3600 ; Retry
3600000 ; Expire
2592000 ) ; Minimum
; Define the nameservers and the mail servers
IN NS 10.1.1.43
mateuscentos7.hopto.org. IN MX 10 mail.mateuscentos7.hopto.org.
mail.mateuscentos7.hopto.org IN A 10.1.1.43
And I changed the /etc/resolv.conf:
Code: Select all
# Generated by NetworkManager
search mateuscentos7.hopto.org
nameserver 10.1.1.1
The only thing that worked was changing the resolv.conf to 10.1.1.1.
When I run systemctl named start, I get this:
Code: Select all
[root@mail named]# systemctl start named
Job for named.service failed because the control process exited with error code. See "systemctl status named.service" and "journalctl -xe" for details.
[root@mail named]# systemctl status named.service
● named.service - Berkeley Internet Name Domain (DNS)
Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Ter 2018-05-29 15:22:19 -03; 24s ago
Process: 18166 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi (code=exited, status=1/FAILURE)
Mai 29 15:22:19 mail bash[18166]: zone 1.1.10.in-addr.arpa/IN: loaded serial 1
Mai 29 15:22:19 mail bash[18166]: zone localhost.localdomain/IN: loaded serial 0
Mai 29 15:22:19 mail bash[18166]: zone localhost/IN: loaded serial 0
Mai 29 15:22:19 mail bash[18166]: 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/IN: loaded serial 0
Mai 29 15:22:19 mail bash[18166]: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
Mai 29 15:22:19 mail bash[18166]: zone 0.in-addr.arpa/IN: loaded serial 0
Mai 29 15:22:19 mail systemd[1]: named.service: control process exited, code=exited status=1
Mai 29 15:22:19 mail systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
Mai 29 15:22:19 mail systemd[1]: Unit named.service entered failed state.
Mai 29 15:22:19 mail systemd[1]: named.service failed.
EDIT: I updated my zone file and I can now start
named.
Code: Select all
[root@mail named]# service named start
Redirecting to /bin/systemctl start named.service
[root@mail named]# systemctl status named
● named.service - Berkeley Internet Name Domain (DNS)
Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
Active: active (running) since Ter 2018-05-29 17:20:45 -03; 8s ago
Process: 28059 ExecStart=/usr/sbin/named -u named -c ${NAMEDCONF} $OPTIONS (code=exited, status=0/SUCCESS)
Process: 28056 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi (code=exited, status=0/SUCCESS)
Main PID: 28061 (named)
CGroup: /system.slice/named.service
└─28061 /usr/sbin/named -u named -c /etc/named.conf
Mai 29 17:20:45 mail named[28061]: zone 1.1.10.in-addr.arpa/IN: loaded serial 1
Mai 29 17:20:45 mail named[28061]: zone localhost.localdomain/IN: loaded serial 0
Mai 29 17:20:45 mail named[28061]: 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/IN: loaded serial 0
Mai 29 17:20:45 mail named[28061]: zone localhost/IN: loaded serial 0
Mai 29 17:20:45 mail systemd[1]: Started Berkeley Internet Name Domain (DNS).
Mai 29 17:20:45 mail named[28061]: mateuscentos7.hopto.org:4: no TTL specified; using SOA MINTTL instead
Mai 29 17:20:45 mail named[28061]: zone mateuscentos7.hopto.org/IN: loaded serial 10120
Mai 29 17:20:45 mail named[28061]: all zones loaded
Mai 29 17:20:45 mail named[28061]: running
Mai 29 17:20:45 mail named[28061]: zone 1.1.10.in-addr.arpa/IN: sending notifies (serial 1)
Code: Select all
;
; Addresses and other host information.
;
@ IN SOA mail.mateuscentos7.hopto.org. hostmaster.mateuscentos7.hopto.org. (
10120 ; Serial
43200 ; Refresh
3600 ; Retry
3600000 ; Expire
2592000 ) ; Minimum
; Define the nameservers and the mail servers
@ IN NS mail.mateuscentos7.hopto.org.
@ IN MX 10 mail.mateuscentos7.hopto.org.
@ IN A 177.3.171.151
mail IN A 177.3.171.151
mail.mateuscentos7.hopto.org. IN TXT "v=spf1 a mx ~all"
Tests:
Code: Select all
[root@mail named]# host mateuscentos7.hopto.org
mateuscentos7.hopto.org has address 177.3.171.151
Code: Select all
[root@mail named]# dig mateuscentos7.hopto.org any
; <<>> DiG 9.9.4-RedHat-9.9.4-61.el7 <<>> mateuscentos7.hopto.org any
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49264
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 13, ADDITIONAL: 27
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;mateuscentos7.hopto.org. IN ANY
;; ANSWER SECTION:
mateuscentos7.hopto.org. 59 IN A 177.3.171.151
;; AUTHORITY SECTION:
. 21867 IN NS a.root-servers.net.
. 21867 IN NS b.root-servers.net.
. 21867 IN NS c.root-servers.net.
. 21867 IN NS d.root-servers.net.
. 21867 IN NS e.root-servers.net.
. 21867 IN NS f.root-servers.net.
. 21867 IN NS g.root-servers.net.
. 21867 IN NS h.root-servers.net.
. 21867 IN NS i.root-servers.net.
. 21867 IN NS j.root-servers.net.
. 21867 IN NS k.root-servers.net.
. 21867 IN NS l.root-servers.net.
. 21867 IN NS m.root-servers.net.
;; ADDITIONAL SECTION:
a.root-servers.net. 518096 IN A 198.41.0.4
a.root-servers.net. 518096 IN AAAA 2001:503:ba3e::2:30
b.root-servers.net. 518096 IN A 199.9.14.201
b.root-servers.net. 518096 IN AAAA 2001:500:200::b
c.root-servers.net. 518096 IN A 192.33.4.12
c.root-servers.net. 518096 IN AAAA 2001:500:2::c
d.root-servers.net. 518096 IN A 199.7.91.13
d.root-servers.net. 518096 IN AAAA 2001:500:2d::d
e.root-servers.net. 518096 IN A 192.203.230.10
e.root-servers.net. 518096 IN AAAA 2001:500:a8::e
f.root-servers.net. 518096 IN A 192.5.5.241
f.root-servers.net. 518096 IN AAAA 2001:500:2f::f
g.root-servers.net. 518096 IN A 192.112.36.4
g.root-servers.net. 518096 IN AAAA 2001:500:12::d0d
h.root-servers.net. 518096 IN A 198.97.190.53
h.root-servers.net. 518096 IN AAAA 2001:500:1::53
i.root-servers.net. 518096 IN A 192.36.148.17
i.root-servers.net. 518096 IN AAAA 2001:7fe::53
j.root-servers.net. 518096 IN A 192.58.128.30
j.root-servers.net. 518096 IN AAAA 2001:503:c27::2:30
k.root-servers.net. 518096 IN A 193.0.14.129
k.root-servers.net. 518096 IN AAAA 2001:7fd::1
l.root-servers.net. 518096 IN A 199.7.83.42
l.root-servers.net. 518096 IN AAAA 2001:500:9f::42
m.root-servers.net. 518096 IN A 202.12.27.33
m.root-servers.net. 518096 IN AAAA 2001:dc3::35
;; Query time: 304 msec
;; SERVER: 10.1.1.1#53(10.1.1.1)
;; WHEN: Ter Mai 29 17:29:04 -03 2018
;; MSG SIZE rcvd: 851
Code: Select all
[root@mail named]# dig mateuscentos7.hopto.org mx
; <<>> DiG 9.9.4-RedHat-9.9.4-61.el7 <<>> mateuscentos7.hopto.org mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17481
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;mateuscentos7.hopto.org. IN MX
;; AUTHORITY SECTION:
hopto.org. 59 IN SOA nf1.no-ip.com. hostmaster.no-ip.com. 2048151290 600 300 604800 600
;; Query time: 255 msec
;; SERVER: 10.1.1.1#53(10.1.1.1)
;; WHEN: Ter Mai 29 17:29:47 -03 2018
;; MSG SIZE rcvd: 112
Now, the only problem I'm having is:
Code: Select all
[root@mail named]# service zimbra start
Host mateuscentos7.hopto.org
Starting ldap...Done.
Failed.
Failed to start slapd. Attempting debug start to determine error.
5b0dba53 daemon: bind(7) failed errno=99 (Cannot assign requested address)
5b0dba53 slap_open_listener: failed on ldap://mateuscentos7.hopto.org:389