DNS64 - BIND9
Información General
| Parámetro | Valor |
|---|---|
| Hostname | dns |
| Imagen | ghcr.io/srl-labs/network-multitool + BIND9 |
| IP de Gestión | 10.99.1.13 |
| Puerto SSH | 56621 |
Función en la Topología
El servidor DNS64 ejecuta BIND9 con la directiva dns64 que sintetiza registros AAAA para dominios que solo tienen registros A. Esto permite que los clientes IPv6-only (conectados al Group Interface ipv6-only) accedan a servicios IPv4 a través de NAT64.
El flujo es: Cliente IPv6 → DNS64 (sintetiza AAAA con prefijo 64:ff9b::/96) → Cliente envía tráfico a 64:ff9b::x.x.x.x → BNG NAT64 traduce a IPv4.
1. INTERFACES
# eth1: hacia BNG MASTER (VPRN 9998)
ip -6 addr add 2001:db8:aaaa::2/126 dev eth1
ip -6 route replace default via 2001:db8:aaaa::1 dev eth1
# eth2: hacia BNG SLAVE (VPRN 9998)
ip -6 addr add 2001:db8:aaab::2/126 dev eth2
ip -6 route replace default via 2001:db8:aaab::1 dev eth2
2. CONFIGURACIÓN BIND (named.conf)
////////////////////////////////////////////////////////////////////////////////
// DNS64 Server Configuration for NAT64 Lab
// NAT64 Prefix: 64:ff9b::/96 (Well-Known Prefix RFC 6052)
////////////////////////////////////////////////////////////////////////////////
options {
directory "/var/cache/bind";
listen-on-v6 { any; };
listen-on { any; };
allow-query { any; };
allow-recursion { any; };
forward only;
forwarders {
8.8.8.8;
8.8.4.4;
};
// DNS64 Configuration
dns64 64:ff9b::/96 {
clients { any; };
mapped { any; };
exclude { any; };
recursive-only yes;
break-dnssec yes;
suffix ::;
};
dnssec-validation no;
querylog yes;
version "DNS64 Server";
};
// Logging - SIN categoría 'dns64' (no existe en BIND 9)
logging {
channel stderr_log {
stderr;
severity info;
print-time yes;
};
category default { stderr_log; };
category queries { stderr_log; };
};
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};
3. INSTALACIÓN EN CONTENEDOR
apk add --no-cache bind bind-tools
mkdir -p /var/cache/bind /var/log/bind
chown -R named:named /var/cache/bind /var/log/bind
named-checkconf /etc/bind/named.conf
named -c /etc/bind/named.conf -u named