1. Install bind9
dnf install bind2. Change /etc/named.conf
options {
#listen-on port 53 { 127.0.0.1; };
listen-on port 53 { any; };
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 { localhost; };
allow-query { any; };
forwarders {
192.168.10.1;
};
recursion yes;
dnssec-enable no;
dnssec-validation no;
managed-keys-directory "/var/named/dynamic";
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
/* https://fedoraproject.org/wiki/Changes/CryptoPolicy */
include "/etc/crypto-policies/back-ends/bind.config";
};
logging {
channel default_debug {
file "data/named.run";
//severity dynamic;
print-category yes;
print-severity yes;
print-time yes;
severity debug;
};
};
zone "example.com" IN {
type master;
file "named.example.com";
};
zone "10.168.192.in-addr.arpa" IN {
type master;
file "10.168.192.in-addr.arpa";
};
3. Add /var/named/example.com
$ORIGIN example.com.
$TTL 1D
; SOA records
example.com. IN SOA F25X64S20170723NamedT.example.com. webadmin.example.com. (
1 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
; NS records
example.com. IN NS F25X64S20170723NamedT.example.com.
;example.com. IN NS ns1.example.com.
;example.com. IN NS ns2.example.com.
; MX records
example.com. IN MX 10 mail
; Addresses for the canonical names
F25X64S20170723NamedT.example.com. IN A 192.168.10.110
;ns1.example.com. IN A 192.168.10.110
;ns2.example.com. IN A 192.168.10.111
F25X64S20170723M1.example.com. IN A 192.168.10.101
F25X64S20170723M2.example.com. IN A 192.168.10.102
F25X64S20170723M3.example.com. IN A 192.168.10.103
F25X64S20170723M4.example.com. IN A 192.168.10.104
F25X64S20170723M5.example.com. IN A 192.168.10.105
F25X64S20170723M6.example.com. IN A 192.168.10.106
F25X64S20170723M7.example.com. IN A 192.168.10.107
F25X64S20170723M8.example.com. IN A 192.168.10.108
F25X64S20170723M9.example.com. IN A 192.168.10.109
F25X64S20170723M0.example.com. IN A 192.168.10.110
; Aliases
;ns1.example.com. IN CNAME F25X64S20170723Named.example.com.
;ns2.example.com. IN CNAME F25X64S20170723Named.example.com.
;example.com. IN CNAME F25X64S20170723Named.example.com.
www.example.com. IN CNAME F25X64S20170723NamedT.example.com.
mail.example.com. IN CNAME F25X64S20170723NamedT.example.com.
4. Add /var/named/10.168.192.in-addr.arpa
$ORIGIN 10.168.192.in-addr.arpa.
$TTL 1D
; SOA records
10.168.192.in-addr.arpa. IN SOA F25X64S20170723NamedT.tkyo.bsg.ad.adp.com. webadmin.tkyo.bsg.ad.adp.com. (
2 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
; NS records
10.168.192.in-addr.arpa. IN NS F25X64S20170723NamedT.example.com.
;10.168.192.in-addr.arpa IN NS ns1.example.com.
;10.168.192.in-addr.arpa IN NS ns2.example.com.
; Addresses point to canonical names
110.10.168.192.in-addr.arpa. IN PTR F25X64S20170723NamedT.example.com.
; Addresses point to canonical names
111.10.168.192.in-addr.arpa. IN PTR F25X64S20170723NamedT.example.com.
101.10.168.192.in-addr.arpa. IN PTR F25X64S20170723M1.example.com.
102.10.168.192.in-addr.arpa. IN PTR F25X64S20170723M2.example.com.
103.10.168.192.in-addr.arpa. IN PTR F25X64S20170723M3.example.com.
104.10.168.192.in-addr.arpa. IN PTR F25X64S20170723M4.example.com.
105.10.168.192.in-addr.arpa. IN PTR F25X64S20170723M5.example.com.
106.10.168.192.in-addr.arpa. IN PTR F25X64S20170723M6.example.com.
107.10.168.192.in-addr.arpa. IN PTR F25X64S20170723M7.example.com.
108.10.168.192.in-addr.arpa. IN PTR F25X64S20170723M8.example.com.
109.10.168.192.in-addr.arpa. IN PTR F25X64S20170723M9.example.com.
110.10.168.192.in-addr.arpa. IN PTR F25X64S20170723M0.example.com.
No comments:
Post a Comment