mirror of
https://github.com/casjaysdevdocker/ddns
synced 2026-06-24 14:01:05 -04:00
♻️ Migrate ddns to /config/ source-of-truth architecture ♻️
Migrate ddns Docker image to the new build-time config architecture. - rootfs/root/docker/setup/03-files.sh: rewrite to canonical form with /tmp/bin, /tmp/var, /tmp/etc, /tmp/usr handlers - rootfs/usr/local/etc/docker/functions/entrypoint.sh: update to latest template - rootfs/usr/local/etc/docker/init.d/*.sh: fix $(basename) UUOC; move inline comments above code lines - rootfs/tmp/etc/: add named, dhcp, nginx, tor, named.conf, radvd.conf configs deployed to /etc/ at build time - rootfs/tmp/usr/: add htdocs and named data files deployed to /usr/local/share/ at build time - rootfs/usr/local/share/template-files/: delete; config now deployed via /tmp/etc/ and /tmp/usr/ at build time rootfs/root/docker/setup/03-files.sh rootfs/tmp/ rootfs/usr/local/etc/docker/functions/entrypoint.sh rootfs/usr/local/share/template-files/config/dhcp/dhcpd4.conf rootfs/usr/local/share/template-files/config/dhcp/dhcpd6.conf rootfs/usr/local/share/template-files/config/env/default.sample rootfs/usr/local/share/template-files/config/env/examples/00-directory.sh rootfs/usr/local/share/template-files/config/env/examples/addresses.sh rootfs/usr/local/share/template-files/config/env/examples/certbot.sh rootfs/usr/local/share/template-files/config/env/examples/couchdb.sh rootfs/usr/local/share/template-files/config/env/examples/dockerd.sh rootfs/usr/local/share/template-files/config/env/examples/global.sh rootfs/usr/local/share/template-files/config/env/examples/healthcheck.sh rootfs/usr/local/share/template-files/config/env/examples/mariadb.sh rootfs/usr/local/share/template-files/config/env/examples/mongodb.sh rootfs/usr/local/share/template-files/config/env/examples/networking.sh rootfs/usr/local/share/template-files/config/env/examples/other.sh rootfs/usr/local/share/template-files/config/env/examples/php.sh rootfs/usr/local/share/template-files/config/env/examples/postgres.sh rootfs/usr/local/share/template-files/config/env/examples/redis.sh rootfs/usr/local/share/template-files/config/env/examples/services.sh rootfs/usr/local/share/template-files/config/env/examples/ssl.sh rootfs/usr/local/share/template-files/config/env/examples/supabase.sh rootfs/usr/local/share/template-files/config/env/examples/webservers.sh rootfs/usr/local/share/template-files/config/env/examples/zz-entrypoint.sh rootfs/usr/local/share/template-files/config/.gitkeep rootfs/usr/local/share/template-files/config/named/certbot-update.conf rootfs/usr/local/share/template-files/config/named/common/001-soa.inc rootfs/usr/local/share/template-files/config/named/common/002-nameservers.inc rootfs/usr/local/share/template-files/config/named/common/003-dns.inc rootfs/usr/local/share/template-files/config/named.conf rootfs/usr/local/share/template-files/config/named/config/0000-logging.conf rootfs/usr/local/share/template-files/config/named/config/0001-rndc.conf rootfs/usr/local/share/template-files/config/named/config/0001-rndc.key rootfs/usr/local/share/template-files/config/named/config/0002-acl.conf rootfs/usr/local/share/template-files/config/named/hosted/host.ddns.conf rootfs/usr/local/share/template-files/config/named/hosted/ip.ddns.conf rootfs/usr/local/share/template-files/config/named/keys/managed-keys.bind rootfs/usr/local/share/template-files/config/named/zones/000-hint.conf rootfs/usr/local/share/template-files/config/named/zones/000-localdomain.zone rootfs/usr/local/share/template-files/config/named/zones/000-localhost.zone rootfs/usr/local/share/template-files/config/named/zones/000-tor.zone rootfs/usr/local/share/template-files/config/named/zones/001-ddns.zone rootfs/usr/local/share/template-files/config/nginx/mime.types rootfs/usr/local/share/template-files/config/nginx/nginx.conf rootfs/usr/local/share/template-files/config/nginx/nginx.ssl.conf rootfs/usr/local/share/template-files/config/radvd.conf rootfs/usr/local/share/template-files/config/tor/torrc rootfs/usr/local/share/template-files/data/.gitkeep rootfs/usr/local/share/template-files/data/htdocs/www/css/.gitkeep rootfs/usr/local/share/template-files/data/htdocs/www/images/.gitkeep rootfs/usr/local/share/template-files/data/htdocs/www/index.php rootfs/usr/local/share/template-files/data/htdocs/www/js/.gitkeep rootfs/usr/local/share/template-files/data/named/data/hint rootfs/usr/local/share/template-files/data/named/data/localdomain.conf rootfs/usr/local/share/template-files/data/named/data/localhost4.rev rootfs/usr/local/share/template-files/data/named/data/localhost6.rev rootfs/usr/local/share/template-files/data/named/data/localhost.zone rootfs/usr/local/share/template-files/data/named/dynamic/ddns.zone rootfs/usr/local/share/template-files/data/named/dynamic/inc/cnames.ddns.zone rootfs/usr/local/share/template-files/data/named/dynamic/inc/static.ipv4.arpa.rev rootfs/usr/local/share/template-files/data/named/dynamic/inc/static.ipv4.ddns.zone rootfs/usr/local/share/template-files/data/named/dynamic/inc/static.ipv6.arpa.rev rootfs/usr/local/share/template-files/data/named/dynamic/inc/static.ipv6.ddns.zone rootfs/usr/local/share/template-files/data/named/dynamic/inc/static.sso.ddns.zone rootfs/usr/local/share/template-files/data/named/master/.gitkeep rootfs/usr/local/share/template-files/data/named/reverse/in-addr.arpa.rev rootfs/usr/local/share/template-files/data/named/reverse/ip6.arpa.rev rootfs/usr/local/share/template-files/data/named/slaves/.gitkeep rootfs/usr/local/share/template-files/defaults/.gitkeep
This commit is contained in:
Executable
+102
@@ -0,0 +1,102 @@
|
||||
######
|
||||
#Domain REPLACE_DOMAIN is dynamic DNS
|
||||
#
|
||||
#DHCP REPLACE_IPV4_ADDRESS
|
||||
|
||||
|
||||
key rndc-key {
|
||||
algorithm hmac-md5;
|
||||
secret REPLACE_WITH_RNDC_KEY;
|
||||
}
|
||||
|
||||
zone REPLACE_DOMAIN {
|
||||
primary 127.0.0.1;
|
||||
key rndc-key;
|
||||
}
|
||||
|
||||
zone in-addr.arpa. {
|
||||
primary 127.0.0.1;
|
||||
key rndc-key;
|
||||
}
|
||||
|
||||
#option T150 code 150 = string;
|
||||
#option wpad-url code 252 = text;
|
||||
#option wpad-url "http://REPLACE_DOMAIN/wpad.dat ";
|
||||
|
||||
authoritative;
|
||||
ddns-ttl 3600;
|
||||
ddns-updates on;
|
||||
ddns-update-style interim;
|
||||
update-static-leases on;
|
||||
update-conflict-detection off;
|
||||
update-optimization on;
|
||||
use-host-decl-names on;
|
||||
ddns-domainname "REPLACE_DOMAIN";
|
||||
ddns-rev-domainname "in-addr.arpa.";
|
||||
allow client-updates;
|
||||
allow unknown-clients;
|
||||
allow booting ;
|
||||
allow bootp ;
|
||||
next-server REPLACE_IPV4_ADDRESS;
|
||||
filename "linux.0";
|
||||
max-lease-time 3600;
|
||||
default-lease-time 3600;
|
||||
dynamic-bootp-lease-length 3600;
|
||||
|
||||
subnet REPLACE_IPV4_SUBNET netmask REPLACE_IPV4_NETMASK {
|
||||
dynamic-bootp-lease-length 3600;
|
||||
option slp-directory-agent true REPLACE_IPV4_ADDRESS;
|
||||
option log-servers REPLACE_IPV4_ADDRESS;
|
||||
option time-servers REPLACE_IPV4_ADDRESS;
|
||||
allow client-updates;
|
||||
ddns-updates on;
|
||||
update-conflict-detection off;
|
||||
update-static-leases true;
|
||||
option routers REPLACE_IPV4_GATEWAY;
|
||||
option subnet-mask REPLACE_IPV4_NETMASK;
|
||||
option nis-domain "REPLACE_DOMAIN";
|
||||
option domain-name "REPLACE_DOMAIN";
|
||||
option domain-search "REPLACE_DOMAIN";
|
||||
option domain-name-servers REPLACE_IPV4_ADDRESS;
|
||||
option time-offset -18000;
|
||||
option ntp-servers REPLACE_IPV4_ADDRESS;
|
||||
option netbios-name-servers REPLACE_IPV4_ADDRESS;
|
||||
option netbios-node-type 8;
|
||||
range dynamic-bootp REPLACE_IPV4_ADDR_START REPLACE_IPV4_ADDR_END;
|
||||
default-lease-time 3600;
|
||||
max-lease-time 3600;
|
||||
authoritative;
|
||||
allow unknown-clients;
|
||||
allow booting;
|
||||
allow bootp;
|
||||
update-static-leases on;
|
||||
next-server REPLACE_IPV4_ADDRESS;
|
||||
filename "pxelinux.0";
|
||||
}
|
||||
|
||||
option architecture-type code 93 = unsigned integer 16;
|
||||
|
||||
class "pxeclients" {
|
||||
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
|
||||
|
||||
if option architecture-type = 0 {
|
||||
filename "pxelinux.0";
|
||||
} elsif option architecture-type = 9 {
|
||||
filename "syslinux64.efi";
|
||||
} elsif option architecture-type = 7 {
|
||||
filename "syslinux64.efi";
|
||||
} elsif option architecture-type = 6 {
|
||||
filename "syslinux32.efi";
|
||||
}
|
||||
}
|
||||
|
||||
## Begin Fixed Addresses ##
|
||||
#Servers REPLACE_IPV4_ADDRESS
|
||||
#################################################
|
||||
|
||||
# host ddns {
|
||||
# hardware ethernet 52:54:00:8f:c5:cb;
|
||||
# fixed-address REPLACE_IPV4_ADDRESS;
|
||||
# ddns-hostname monitor;
|
||||
# ddns-domainname "REPLACE_DOMAIN";
|
||||
# }
|
||||
Executable
+99
@@ -0,0 +1,99 @@
|
||||
#Domain REPLACE_DOMAIN is dynamic DNS
|
||||
#
|
||||
#Servers REPLACE_IPV6_ADDR
|
||||
|
||||
key rndc-key {
|
||||
algorithm hmac-md5;
|
||||
secret REPLACE_WITH_RNDC_KEY;
|
||||
}
|
||||
|
||||
zone REPLACE_DOMAIN {
|
||||
primary 127.0.0.1;
|
||||
key rndc-key;
|
||||
}
|
||||
|
||||
zone ip6.arpa {
|
||||
primary 127.0.0.1;
|
||||
key rndc-key;
|
||||
}
|
||||
|
||||
#option T150 code 150 = string;
|
||||
#option wpad-url code 252 = text;
|
||||
#option wpad-url "http://REPLACE_DOMAIN/wpad.dat";
|
||||
|
||||
authoritative;
|
||||
ddns-ttl 3600;
|
||||
ddns-updates on;
|
||||
ddns-update-style interim;
|
||||
update-static-leases on;
|
||||
update-conflict-detection off;
|
||||
update-optimization on;
|
||||
use-host-decl-names on;
|
||||
ddns-domainname "REPLACE_DOMAIN";
|
||||
ddns-rev-domainname "ip6.arpa.";
|
||||
allow client-updates;
|
||||
allow unknown-clients;
|
||||
allow booting ;
|
||||
allow bootp ;
|
||||
option dhcp6.bootfile-url "tftp://[REPLACE_IPV6_ADDRESS]/linux.0";
|
||||
option dhcp6.bootfile-url code 59 = string ;
|
||||
max-lease-time 43200;
|
||||
default-lease-time 43200;
|
||||
dynamic-bootp-lease-length 43200;
|
||||
|
||||
subnet6 REPLACE_IPV6_SUBNET/REPLACE_IPV6_SUBNET {
|
||||
dynamic-bootp-lease-length 3600;
|
||||
allow client-updates;
|
||||
ddns-ttl 43200;
|
||||
ddns-updates on;
|
||||
ddns-update-style standard;
|
||||
update-static-leases on;
|
||||
update-static-leases true;
|
||||
update-conflict-detection off;
|
||||
update-optimization false;
|
||||
use-host-decl-names on;
|
||||
ddns-domainname "REPLACE_DOMAIN";
|
||||
ddns-rev-domainname "ip6.arpa";
|
||||
option subnet-mask IPV4_ADDR_NETMASK;
|
||||
option nis-domain "REPLACE_DOMAIN";
|
||||
option domain-name "REPLACE_DOMAIN";
|
||||
option dhcp6.name-servers REPLACE_IPV6_ADDRESS;
|
||||
option time-offset -18000;
|
||||
option netbios-node-type 8;
|
||||
option dhcp6.domain-search "REPLACE_DOMAIN";
|
||||
range6 REPLACE_IPV6_ADDR_START REPLACE_IPV6_ADDR_END;
|
||||
default-lease-time 43200;
|
||||
max-lease-time 43200;
|
||||
authoritative;
|
||||
allow unknown-clients;
|
||||
allow booting;
|
||||
allow bootp;
|
||||
option dhcp6.bootfile-url "tftp://[REPLACE_IPV6_ADDRESS]/linux.0";
|
||||
}
|
||||
|
||||
option architecture-type code 93 = unsigned integer 16;
|
||||
|
||||
class "pxeclients" {
|
||||
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
|
||||
|
||||
if option architecture-type = 0 {
|
||||
filename "pxelinux.0";
|
||||
} elsif option architecture-type = 9 {
|
||||
filename "syslinux64.efi";
|
||||
} elsif option architecture-type = 7 {
|
||||
filename "syslinux64.efi";
|
||||
} elsif option architecture-type = 6 {
|
||||
filename "syslinux32.efi";
|
||||
}
|
||||
}
|
||||
|
||||
## Begin Fixed Addresses ##
|
||||
#Servers REPLACE_IPV6_ADDRESS
|
||||
#################################################
|
||||
|
||||
# host ddns {
|
||||
# hardware ethernet 00:50:56:a1:87:a8;
|
||||
# fixed-address6 REPLACE_IPV6_ADDRESS;
|
||||
# ddns-hostname ddns;
|
||||
# ddns-domainname "REPLACE_DOMAIN";
|
||||
# }
|
||||
Reference in New Issue
Block a user