client

  1. mkdir -p /root/scripts/dynProxy/token
  2. vim /root/scripts/dynProxy/update_zone_client.sh
    edit TOKEN_FILE
  3. chmod +x /root/scripts/dynProxy/update_zone_client.sh
  4. openssl rand -hex 16 > /root/scripts/dynProxy/token/SUBDOM.DOM.TLD
  5. crontab -e
Tags
acl "trusted" {
       127.0.0.0/8;
       10.0.3.0/24;
       192.168.0.0/24;
};
options {
    directory "/var/cache/bind";
    dnssec-validation no;
   querylog yes;
   auth-nxdomain no;
   notify yes;
   version none;
    listen-on { 127.0.0.1; SRVIP; };
    listen-on-v6 { ::1; SRVIP; };
   
   allow-query { any; };
   allow-query-cache { trusted; };
   recursion yes;
   allow-recursion { trusted; };
   max-cache-size 512M;
};
logging {
   channel default_file {
       file "/var/log/named/defa
Tags

#!/bin/zsh
# Script Version: 10
# Description: Dyn DNS update script, checks token, compares IPs, and updates DNS zone if needed.

# Set variables
# ========
TOKEN_FILE="/root/scripts/dynProxy/token.txt"
IP_FILE="/root/scripts/dynProxy/ip.txt"
UPDATE_URL="http://ip.dynproxy.net/update_zone"
LOG_FILE="/var/log/update_zone.log"

# Functions
# ========
log() {
    print "$(date '+%Y-%m-%dT%H:%M:%S.%6N'): $1" >> "$LOG_FILE"
}

#!/bin/zsh
# Script Version: 12.4
# Description: Dyn DNS update script, checks token and updates DNS zone.

# Set variables
DIRECTORY="/var/www/ip/token"
LOG_FILE="/var/log/dynProxy.log"
TOKEN_DNS_ZONE_FILE="/etc/bind/tokendnszone.conf"
NSUPDATE_SERVER="127.0.0.1"
DEBUG=true

log() {
   local message="$1"
   echo "$(date '+%Y-%m-%dT%H:%M:%S.%6N'): $message" >> "$LOG_FILE"
   if $DEBUG; then echo "$message"; fi
}

log_debug() {
   if $DEBUG; then log "$1"; fi
}

Here’s a concise BIND9 Dynamic Zone Management Cheat Sheet to handle common tasks and troubleshoot dynamic zones:

Tags
#!/usr/bin/zsh
# Script Version: 01
# Description: Script to obtain the public IP and post it to a server securely.

# Define the path to store the token
TOKEN_FILE="/root/scripts/token.txt"
LOG_FILE="/var/log/ipgetpost.log"
IP_URL="http://ip.dynproxy.net"

# Function to log messages
log_message() {
    print "$(date): $1" >> "$LOG_FILE"
}

# Set umask to ensure files are created with the correct permissions
umask 077

# Check if the token file already exists, if not, generate a new token
if [ !