Skip to content

Commit bc17d45

Browse files
committed
dns: utilitzem un dns cache que fa d'autoritatiu d'algunes zones
1 parent 1a9e746 commit bc17d45

File tree

7 files changed

+39
-11
lines changed

7 files changed

+39
-11
lines changed

dns_authoritative_server/named.conf dns_authoritative_server/conf/named.conf

+8-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,14 @@ options {
3131

3232
// Example of how to configure a zone for which this server is the master:
3333
zone "example.local" IN {
34-
type master;
35-
file "/etc/bind/zones/example.local";
34+
type master;
35+
file "/etc/bind/zones/example.local";
36+
};
37+
38+
zone "guifibages.net" IN {
39+
type master;
40+
file "/etc/bind/zones/db.guifibages.net";
3641
};
3742

3843
// You can include files:
39-
//include "/etc/bind/zones/example.conf";
44+
//include "/etc/bind/zones/example.conf";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
$TTL 60
2+
@ IN SOA ns.guifibages.net. root.guifibages.net. (
3+
1 ; Serial
4+
604800 ; Refresh
5+
86400 ; Retry
6+
2419200 ; Expire
7+
604800 ) ; Negative Cache TTL
8+
;
9+
@ IN NS ns.guifibages.net.
10+
ns IN A 10.228.17.250
11+
ns2 IN A 10.228.18.51
12+
13+
; màquines
14+
s1 IN A 10.228.17.250
15+
s2 IN A 10.228.18.51
16+
17+
; propietaris
18+
paco IN CNAME s1
19+
xevi IN CNAME s2
20+
21+
; serveis
22+
pool.ntp IN A 10.228.17.250
23+
pool.ntp IN A 10.228.18.51
24+

dns_authoritative_server/docker-compose.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ services:
33
dns:
44
build: .
55
ports:
6-
- "53:53"
7-
- "53:53/udp"
6+
- "127.0.0.2:53:53"
7+
- "127.0.0.2:53:53/udp"
88
volumes:
9-
- ./named.conf:/etc/bind/named.conf:ro
10-
- ./zones/:/etc/bind/zones/:ro
9+
- ./conf:/etc/bind:ro
10+
restart: always

dns_recursive_server/named.conf dns_recursive_server/config/named.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ options {
77

88
// If you want to allow only specific hosts to use the DNS server:
99
allow-query {
10-
any;
10+
10.0.0.0/8;
1111
};
1212

1313
// Specify a list of IPs/masks to allow zone transfers to here.
@@ -25,7 +25,7 @@ options {
2525

2626
// Changing this is NOT RECOMMENDED; see the notes above and in
2727
// named.conf.recursive.
28-
//allow-recursion { none; };
28+
allow-recursion { 10.0.0.0/8; };
2929
recursion yes;
3030

3131
forwarders {

dns_recursive_server/docker-compose.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ services:
66
- "53:53"
77
- "53:53/udp"
88
volumes:
9-
- ./named.conf:/etc/bind/named.conf:ro
10-
- ./zones/:/etc/bind/zones/:ro
9+
- ./config:/etc/bind:ro
1110
restart: always

0 commit comments

Comments
 (0)