1. vim /etc/bind/named.conf.options
  2. vim /etc/bind/named.conf.local
  3. mkdir /var/log/named/
  4. chown -R bind:bind /var/log/named/
  5. sc-restart named.service
  6. t /var/log/named/*

🛍 DNS-Referenz-Setup (ns1.dynproxy.net – 23.88.113.138)

🔐 Rollenverteilung

  • Autoritativer DNS-Server für:
    • dynproxy.net
    • bubuit.net
  • Lokaler Resolver für:
    • 127.0.0.1

📜 Wichtige Konfigurationsregeln

Tags

/etc/hosts @lxc-host

127.0.0.1	localhost			localhost.localdomain
PUBLIC-IP	HOSTNAME.DOM.TLD	HOSTNAME
10.0.3.ip	peertube.DOM.TLD	peertube
10.0.3.ip	webradio.DOM.TLD	webradio
10.0.3.ip	jitsi.DOM.TLD		jitsi
10.0.3.ip	lists.DOM.TLD		lists
10.0.3.ip	drupal.DOM.TLD		drupal
10.0.3.ip	owncloud.DOM.TLD	owncloud

/etc/hostname

jitsi
  1. hostname -F /etc/hostname
  2. hostnamectl status
  3. hostnamectl set-hostname jitsi
  4. hostname --fqdn
    • jitsi.bubuit.net
Tags
#!/bin/zsh
# Version 02.9

# Variables
NAMED_CONF_LOCAL="/etc/bind/named.conf.local"
CHECKZONE_CMD="named-checkzone"

# Function to parse zones and file paths
parse_zones() {
    awk '/zone/ {gsub(/[\";]/, ""); zone=$2} /file/ {gsub(/[\";]/, ""); file=$2; print file}' "$NAMED_CONF_LOCAL"
}

# Main function
main() {
    echo "Parsing $NAMED_CONF_LOCAL for zone files"

    parse_zones | while read -r ZONE_FILE; do
        if [ -z "$ZONE_FILE" ]; then
            echo "No file specified for zone"
            continue
        fi

        if [ -f "$ZONE_FILE" ]
Tags
#!/bin/zsh
# Version 01.0
# Script to test DNS zone propagation across ns1, ns2, and ns3
# Script Name: test_ns_zones.sh

# Variables
NS1="23.88.113.138"
NS2="116.202.112.180"
NS3="95.216.198.140"

# Check if a domain name argument is provided
if [ -z "$1" ]; then
	echo "Usage: $0 <domain.tld>"
	exit 1
fi

DOMAIN=$1

# Function to test a DNS query
function test_ns {
	local NS=$1
	echo "
=== Testing $DOMAIN on $NS ==="
	dig @$NS $DOMAIN SOA +short
echo ""
	echo "MX Record:"
	dig @$NS $DOMAIN MX +short
echo ""
	echo "A Record for mail.$DOMAIN:"
	dig @$
Tags
#!/bin/zsh
# Version 01.0
# Script to add a new slave zone to /etc/bind/named.conf.local on ns2.dynproxy.net
# Script Name: bind_add_slave_zone.sh

# Variables
NAMED_CONF="/etc/bind/named.conf.local"
CACHE_DIR="/var/cache/bind"

# Check if a domain name argument is provided
if [ -z "$1" ]; then
	echo "Usage: $0 <domain.tld>"
	exit 1
fi

DOMAIN=$1
ZONE_FILE="$CACHE_DIR/db.$DOMAIN"

# Check if the zone configuration already exists
if grep -q "zone \"$DOMAIN\"" $NAMED_CONF; then
	echo "Zone $DOMAIN already exists in $NAMED_CONF.
Tags
#!/bin/zsh
# Version 01.0
# Script to add a new slave zone to /etc/bind/named.conf.local on ns3.dynproxy.net
# Script Name: bind_add_slave_zone_ns3.sh

# Variables
NAMED_CONF="/etc/bind/named.conf.local"
CACHE_DIR="/var/cache/bind"

# Check if a domain name argument is provided
if [ -z "$1" ]; then
	echo "Usage: $0 <domain.tld>"
	exit 1
fi

DOMAIN=$1
ZONE_FILE="$CACHE_DIR/$DOMAIN.db"

# Check if the zone configuration already exists
if grep -q "zone \"$DOMAIN\"" $NAMED_CONF; then
	echo "Zone $DOMAIN already exists in $NAMED_CONF.
Tags
#!/bin/zsh
# Version 01.0
# Script to add a new zone to /etc/bind/named.conf.local on ns1.dynproxy.net
# Script Name: bind_add_zone.sh

# Variables
NAMED_CONF="/etc/bind/named.conf.local"
ZONES_DIR="/etc/bind/zones"

# Check if a domain name argument is provided
if [ -z "$1" ]; then
	echo "Usage: $0 <domain.tld>"
	exit 1
fi

DOMAIN=$1
ZONE_FILE="$ZONES_DIR/db.$DOMAIN"

# Check if the zone file already exists
if [ -f "$ZONE_FILE" ]; then
	echo "Zone file $ZONE_FILE already exists.
Tags
  1. https://github.com/firehol/firehol/wiki/dnsbl-ipset.sh
  2. /usr/share/doc/firehol-tools/examples/contrib/dnsbl-ipset.sh

/etc/firehol/firehol.conf

ipset4 create dnsbl hash:ip timeout $[86400 * 14] maxelem 500000 prevent_reset_on_restart comment 
action4 AUDIT_ACCEPT \ 
action ACCEPT state NEW log "AUDIT" \ 
next action ACCEPT 
blacklist4 full inface "${wan}" ipset:dnsbl \ 
except src ipset:whitelist

leider waren auch

  1. https://docs.hetzner.com/de/dns-console/dns/general/recursive-name-servers/
  2. https://linuxhint.com/install_dig_debian_9/

vim /etc/dnsmasq.conf

cache-size=10000
# neg-ttl=3600

interface=lxcbr0
bind-interfaces

vim /etc/resolv.conf

nameserver    10.0.3.1

domain bubuit.net
search bubuit.net

nameserver DN
Tags
#!/bin/sh
# =============================================================================
# Script Name: hostname_update.sh
# Version: 1.1
# Author: Andreas Fleckl
# Description: This script retrieves the public IP address, performs a reverse 
#              DNS lookup, updates the system's hostname, and restarts the 
#              Postfix service.
Tags