make it work.
This commit is contained in:
parent
10afbf665c
commit
67287e81ad
|
@ -2,51 +2,53 @@
|
||||||
volumes:
|
volumes:
|
||||||
bind9_cache:
|
bind9_cache:
|
||||||
driver: local
|
driver: local
|
||||||
|
primary_var_lib_bind:
|
||||||
|
driver: local
|
||||||
|
secondary_var_lib_bind:
|
||||||
|
driver: local
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
pub_dns:
|
pub_dns_net:
|
||||||
name: pub_dns
|
external: true
|
||||||
driver: macvlan
|
|
||||||
driver_opts:
|
|
||||||
parent: eth0.153
|
|
||||||
ipam:
|
|
||||||
config:
|
|
||||||
- subnet: 10.99.153.240/28
|
|
||||||
ip_range: 10.99.153.240/28
|
|
||||||
gateway: 10.99.153.254
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
primary:
|
primary:
|
||||||
container_name: ns1
|
container_name: ns1
|
||||||
image: ubuntu/bind9:9.18-22.04_beta
|
image: ubuntu/bind9:9.18-22.04_beta
|
||||||
restart: always
|
restart: always
|
||||||
|
user: root
|
||||||
environment:
|
environment:
|
||||||
- TZ='America/Indianapolis'
|
- TZ='America/Indianapolis'
|
||||||
- BIND9_USER=bind
|
- BIND9_USER=bind
|
||||||
volumes:
|
volumes:
|
||||||
- ./primary/etc/bind/named.conf:/etc/bind/named.conf:ro
|
#- primary_var_lib_bind:/var/lib/bind
|
||||||
- ./primary/var/lib/bind:/var/lib/bind
|
- ./primary/var/lib/bind:/var/lib/bind:rw
|
||||||
|
- ./primary/etc/bind/named.conf:/etc/bind/named.conf
|
||||||
|
#- primary/var/lib/bind:/tmp/bind
|
||||||
networks:
|
networks:
|
||||||
infra_dev_net:
|
pub_dns_net:
|
||||||
ipv4_address: 10.99.153.241
|
ipv4_address: 10.99.153.241
|
||||||
|
# command: [ "cp", "-rv", "/tmp/bind/*", "/var/lib/bind/" ]
|
||||||
deploy:
|
deploy:
|
||||||
placement:
|
placement:
|
||||||
constraints: [node.role == manager]
|
constraints: [node.role == manager]
|
||||||
|
|
||||||
services:
|
|
||||||
secondary:
|
secondary:
|
||||||
container_name: ns2
|
container_name: ns2
|
||||||
image: ubuntu/bind9:9.18-22.04_beta
|
image: ubuntu/bind9:9.18-22.04_beta
|
||||||
restart: always
|
restart: always
|
||||||
|
user: root
|
||||||
environment:
|
environment:
|
||||||
- TZ='America/Indianapolis'
|
- TZ='America/Indianapolis'
|
||||||
- BIND9_USER=bind
|
- BIND9_USER=bind
|
||||||
volumes:
|
volumes:
|
||||||
|
#- secondary_var_lib_bind:/var/lib/bind
|
||||||
|
- ./secondary/var/lib/bind:/var/lib/bind:rw
|
||||||
- ./secondary/etc/bind/named.conf:/etc/bind/named.conf:ro
|
- ./secondary/etc/bind/named.conf:/etc/bind/named.conf:ro
|
||||||
- ./secondary/var/lib/bind:/var/lib/bind
|
#- secondary/var/lib/bind:/tmp/bind
|
||||||
networks:
|
networks:
|
||||||
infra_dev_net:
|
pub_dns_net:
|
||||||
ipv4_address: 10.99.153.242
|
ipv4_address: 10.99.153.242
|
||||||
|
#command: [ "cp", "-rv", "/tmp/bind/*", "/var/lib/bind/" ]
|
||||||
deploy:
|
deploy:
|
||||||
placement:
|
placement:
|
||||||
constraints: [node.role == worker]
|
constraints: [node.role == worker]
|
||||||
|
|
|
@ -1,96 +1,36 @@
|
||||||
options {
|
options {
|
||||||
|
|
||||||
directory "/var/lib/named";
|
directory "/var/lib/bind";
|
||||||
dump-file "/var/log/named_dump.db";
|
dump-file "/var/log/named_dump.db";
|
||||||
statistics-file "/var/log/named.stats";
|
statistics-file "/var/log/named.stats";
|
||||||
|
|
||||||
# The forwarders record contains a list of servers to which queries
|
|
||||||
# should be forwarded. Up to three servers may be listed.
|
|
||||||
|
|
||||||
#forwarders { 62.31.176.39 ; 193.38.113.3; };
|
|
||||||
|
|
||||||
# Enable the next entry to prefer usage of the name server declared in
|
|
||||||
# the forwarders section.
|
|
||||||
|
|
||||||
#forward first;
|
|
||||||
|
|
||||||
#listen-on-v6 { any; };
|
|
||||||
|
|
||||||
# If notify is set to yes (default), notify messages are sent to other
|
|
||||||
# name servers when the zone data is changed. Instead of setting
|
|
||||||
# a global 'notify' statement in the 'options' section, a separate
|
|
||||||
# 'notify' can be added to each zone definition.
|
|
||||||
|
|
||||||
notify yes;
|
notify yes;
|
||||||
};
|
};
|
||||||
|
|
||||||
# The following zone definitions don't need any modification. The first one
|
zone "thelinuxpro.net" in {
|
||||||
# is the definition of the root name servers. The second one defines
|
|
||||||
# localhost while the third defines the reverse lookup for localhost.
|
|
||||||
|
|
||||||
#zone "." in {
|
|
||||||
# type hint;
|
|
||||||
# file "root.hint";
|
|
||||||
#};
|
|
||||||
|
|
||||||
#zone "localhost" in {
|
|
||||||
# type master;
|
|
||||||
# file "localhost.zone";
|
|
||||||
#};
|
|
||||||
|
|
||||||
#zone "0.0.127.in-addr.arpa" in {
|
|
||||||
# type master;
|
|
||||||
# file "127.0.0.zone";
|
|
||||||
#};
|
|
||||||
|
|
||||||
# This is where you put in the link to the zone you
|
|
||||||
# want to serve
|
|
||||||
|
|
||||||
zone "in.thelinuxpro.net" in {
|
|
||||||
type master;
|
type master;
|
||||||
file "/var/lib/named/in.thelinuxpro.net.zone";
|
file "/var/lib/bind/db.thelinuxpro.net";
|
||||||
allow-transfer { 10.99.153.242; };
|
allow-transfer { 10.99.153.242; };
|
||||||
also-notify { 10.99.153.242; };
|
also-notify { 10.99.153.242; };
|
||||||
};
|
};
|
||||||
|
|
||||||
zone "254.200.10.in-addr.arpa" in {
|
zone "in.thelinuxpro.net" in {
|
||||||
type master;
|
type master;
|
||||||
file "10.200.254.zone";
|
file "/var/lib/bind/db.in.thelinuxpro.net";
|
||||||
|
allow-transfer { 10.99.153.242; };
|
||||||
|
also-notify { 10.99.153.242; };
|
||||||
};
|
};
|
||||||
|
|
||||||
zone "99.200.10.in-addr.arpa" in {
|
zone "200.10.in-addr.arpa" in {
|
||||||
type master;
|
type master;
|
||||||
file "10.200.99.zone";
|
file "db.10.200";
|
||||||
};
|
};
|
||||||
|
|
||||||
zone "53.200.10.in-addr.arpa" in {
|
zone "99.10.in-addr.arpa" in {
|
||||||
type master;
|
type master;
|
||||||
file "10.200.53.zone";
|
file "db.10.99";
|
||||||
};
|
|
||||||
|
|
||||||
zone "153.99.10.in-addr.arpa" in {
|
|
||||||
type master;
|
|
||||||
file "10.99.153.zone";
|
|
||||||
};
|
|
||||||
|
|
||||||
zone "23.99.10.in-addr.arpa" in {
|
|
||||||
type master;
|
|
||||||
file "10.99.23.zone";
|
|
||||||
};
|
|
||||||
|
|
||||||
zone "22.99.10.in-addr.arpa" in {
|
|
||||||
type master;
|
|
||||||
file "10.99.22.zone";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
zone "0.0.127.in-addr.arpa" in {
|
zone "0.0.127.in-addr.arpa" in {
|
||||||
type master;
|
type master;
|
||||||
file "127.0.0.zone";
|
file "db.127";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Include the meta include file generated by createNamedConfInclude. This
|
|
||||||
# includes all files as configured in NAMED_CONF_INCLUDE_FILES from
|
|
||||||
# /etc/sysconfig/named
|
|
||||||
|
|
||||||
include "/etc/named.conf.include";
|
|
||||||
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
|
|
||||||
$ORIGIN 1.0.10.in-addr.arpa
|
|
||||||
$TTL 86400
|
|
||||||
@ IN SOA dns1.domain.com. hostmaster.domain.com. (
|
|
||||||
20240413021 ; serial
|
|
||||||
21600 ; refresh after 6 hours
|
|
||||||
3600 ; retry after 1 hour
|
|
||||||
604800 ; expire after 1 week
|
|
||||||
86400 ) ; minimum TTL of 1 day
|
|
||||||
|
|
||||||
IN NS dns1.domain.com.
|
|
||||||
IN NS dns2.domain.com.
|
|
||||||
|
|
||||||
1 IN PTR localhost.
|
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
$TTL 1H
|
|
||||||
@ IN SOA in.thelinuxpro.net. root.in.thelinuxpro.net. (
|
|
||||||
2024041301 ; serial, todays date + todays serial #
|
|
||||||
1H ; refresh, seconds
|
|
||||||
2H ; retry, seconds
|
|
||||||
1D ; expire, seconds
|
|
||||||
1D ) ; minimum, seconds
|
|
||||||
NS ns1.in.thelinuxpro.net.
|
|
||||||
NS ns2.in.thelinuxpro.net.
|
|
||||||
; MX 10 thelinuxpro.net. ; Primary Mail Exchanger
|
|
||||||
TXT "The Linux Pro Net"
|
|
||||||
|
|
||||||
localhost A 127.0.0.1
|
|
||||||
|
|
||||||
unifi A 10.200.254.254
|
|
||||||
|
|
||||||
;ns1 A 204.8.15.80
|
|
||||||
;ns2 A 204.8.15.81
|
|
||||||
|
|
||||||
ns1 A 10.99.153.241
|
|
||||||
ns2 A 10.99.153.242
|
|
||||||
|
|
||||||
1.ntp A 10.200.53.251
|
|
||||||
2.ntp A 10.200.53.252
|
|
||||||
|
|
||||||
dns01 A 10.200.53.241
|
|
||||||
dns02 A 10.200.53.242
|
|
||||||
dns03 A 10.200.53.243
|
|
||||||
|
|
||||||
git A 10.99.23.12
|
|
||||||
jenkins A 10.99.23.11
|
|
||||||
|
|
||||||
pi401 A 10.99.22.61
|
|
||||||
pi501 A 10.99.22.51
|
|
Loading…
Reference in New Issue