next up previous contents
Next: Mailserver-Konfiguration (kx_mail_mailertable.sh) Up: Anhang Previous: Name-Server-Optionen (kx_named.conf.options.sh):   Contents

Name-Server Teil 2 (kx_name.conf.sh):

#!/bin/sh

# Erstellt die bind8-Config-Datei /etc/bind/named.conf 

set $(cat /tmp/ipsub_intern.txt | tr "/" " ")  
IP_INT=$1  
SUB_INT=$2 

set $(cat /tmp/ipsub_extern.txt | tr "/" " ")  
IP_EXT=$1  
SUB_EXT=$2

set $(echo $IP_INT | tr "." " ")  
IP_INT_LAST=$4  
IP_INT_LAST_P=`expr $4 + 1` IP_PARTNER=$1.$2.$3.$IP_INT_LAST_P 

rm -f /etc/bind/named.conf cp /KNOPPIX/etc/bind/named.conf /etc/bind/ 

echo "include \"/etc/bind/named.conf.options\";" > /etc/bind/named.conf  
echo "logging {" >> /etc/bind/named.conf  
echo " category lame-servers { null; };" >> /etc/bind/named.conf  
echo " category cname { null; };" >> /etc/bind/named.conf  
echo "};" >> /etc/bind/named.conf  
echo "zone \".\" {" >> /etc/bind/named.conf echo " type hint;" >> /etc/bind/named.conf  
echo " file \"/etc/bind/db.root\";" >> /etc/bind/named.conf  
echo "};" >> /etc/bind/named.conf  
echo "zone \"localhost\" {" >> /etc/bind/named.conf  
echo " type master;" >> /etc/bind/named.conf  
echo " file \"/etc/bind/db.local\";" >> /etc/bind/named.conf  
echo "};" >> /etc/bind/named.conf  
echo "zone \"127.in-addr.arpa\" {" >> /etc/bind/named.conf  
echo " type master;" >> /etc/bind/named.conf  
echo " file \"/etc/bind/db.127\";" >> /etc/bind/named.conf  
echo "};" >> /etc/bind/named.conf  
echo "zone \"0.in-addr.arpa\" {" >> /etc/bind/named.conf  
echo " type master;" >> /etc/bind/named.conf  
echo " file \"/etc/bind/db.0\";" >> /etc/bind/named.conf  
echo "};" >> /etc/bind/named.conf  
echo "zone \"255.in-addr.arpa\" {" >> /etc/bind/named.conf  
echo " type master;" >> /etc/bind/named.conf  
echo " file \"/etc/bind/db.255\";" >> /etc/bind/named.conf  
echo "};" >> /etc/bind/named.conf  
echo "zone \"secp.nm.informatik.uni-muenchen.de\" {" >> /etc/bind/named.conf  
echo " type slave;" >> /etc/bind/named.conf  
echo " file \"/etc/bind/sec-db.secp.nm.informatik.uni-muenchen.de\";" >> /etc/bind/named.conf  
echo " masters {" >> /etc/bind/named.conf  
echo " 192.168.216.24;" >> /etc/bind/named.conf  
echo " };" >> /etc/bind/named.conf  
echo "};" >> /etc/bind/named.conf  
echo "zone \"uni-muenchen.de\" {" >> /etc/bind/named.conf  
echo " type forward;" >> /etc/bind/named.conf  
echo " forward only;" >> /etc/bind/named.conf  
echo " forwarders {" >> /etc/bind/named.conf  
echo " 192.168.216.253;" >> /etc/bind/named.conf  
echo " };" >> /etc/bind/named.conf  
echo "};" >> /etc/bind/named.conf  
echo "zone \"216.168.192.in-addr.arpa\" {" >> /etc/bind/named.conf echo " type slave;" >> /etc/bind/named.conf  
echo " file \"/etc/bind/sec-db.216.168.192\";" >> /etc/bind/named.conf echo " masters {" >> /etc/bind/named.conf  
echo " 192.168.216.110;" >> /etc/bind/named.conf  
echo " };" >> /etc/bind/named.conf  
echo "};" >> /etc/bind/named.conf echo "// add local zone definitions here" >> /etc/bind/named.conf  
echo "include \"/etc/bind/named.conf.local\";" >> /etc/bind/named.conf


next up previous contents
Next: Mailserver-Konfiguration (kx_mail_mailertable.sh) Up: Anhang Previous: Name-Server-Optionen (kx_named.conf.options.sh):   Contents
clumsy 2005-07-21