More dns nameservers

This commit is contained in:
Bob Mottram 2016-12-07 16:57:57 +00:00
parent 7c6db87b59
commit 7359cdd64a
7 changed files with 82 additions and 2 deletions

View File

@ -219,6 +219,26 @@ else
shift
NAMESERVER2=$1
;;
# DNS Nameserver 3
--ns3)
shift
NAMESERVER3=$1
;;
# DNS Nameserver 4
--ns4)
shift
NAMESERVER4=$1
;;
# DNS Nameserver 5
--ns5)
shift
NAMESERVER5=$1
;;
# DNS Nameserver 6
--ns6)
shift
NAMESERVER6=$1
;;
# Debian repository
--repo)
shift

View File

@ -85,6 +85,10 @@ BOX_IP_ADDRESS="192.168.1.55"
# DNS
NAMESERVER1='213.73.91.35'
NAMESERVER2='85.214.20.141'
NAMESERVER3='213.73.91.35'
NAMESERVER4='85.214.73.63'
NAMESERVER5='8.8.8.8'
NAMESERVER6='4.4.4.4'
# An optional freedombone configuration file
CONFIG_FILENAME=
@ -274,6 +278,10 @@ function mesh_router_setup_script {
echo 'DEBIAN_REPO=' >> $mesh_script_filename
echo 'NAMESERVER1=' >> $mesh_script_filename
echo 'NAMESERVER2=' >> $mesh_script_filename
echo 'NAMESERVER3=' >> $mesh_script_filename
echo 'NAMESERVER4=' >> $mesh_script_filename
echo 'NAMESERVER5=' >> $mesh_script_filename
echo 'NAMESERVER6=' >> $mesh_script_filename
echo 'BATMAN_CELLID=any' >> $mesh_script_filename
echo 'WIFI_CHANNEL=9' >> $mesh_script_filename
}
@ -340,6 +348,26 @@ do
shift
NAMESERVER2="$1"
;;
# nameserver 3
--ns3|--nameserver3)
shift
NAMESERVER2="$1"
;;
# nameserver 4
--ns4|--nameserver4)
shift
NAMESERVER4="$1"
;;
# nameserver 5
--ns5|--nameserver5)
shift
NAMESERVER5="$1"
;;
# nameserver 6
--ns6|--nameserver6)
shift
NAMESERVER6="$1"
;;
-i|--interactive)
shift
INTERACTIVE="$1"
@ -526,6 +554,10 @@ make $IMAGE_TYPE \
BOX_IP_ADDRESS="$BOX_IP_ADDRESS" \
NAMESERVER1="$NAMESERVER1" \
NAMESERVER2="$NAMESERVER2" \
NAMESERVER3="$NAMESERVER3" \
NAMESERVER4="$NAMESERVER4" \
NAMESERVER5="$NAMESERVER5" \
NAMESERVER6="$NAMESERVER6" \
PROJECT_NAME="$PROJECT_NAME" \
CONFIG_FILENAME="$CONFIG_FILENAME" \
IMAGE_SIZE="$IMAGE_SIZE" \

View File

@ -54,6 +54,10 @@ export ROUTER_IP_ADDRESS
export BOX_IP_ADDRESS
export NAMESERVER1
export NAMESERVER2
export NAMESERVER3
export NAMESERVER4
export NAMESERVER5
export NAMESERVER6
export PROJECT_NAME
export CONFIG_FILENAME
export SSH_PUBKEY
@ -200,7 +204,11 @@ fi
sed -i "s|ROUTER_IP_ADDRESS=.*|ROUTER_IP_ADDRESS=${ROUTER_IP_ADDRESS}|g" $TEMP_CUSTOMISE3
sed -i "s|BOX_IP_ADDRESS=.*|BOX_IP_ADDRESS=${BOX_IP_ADDRESS}|g" $TEMP_CUSTOMISE3
sed -i "s|NAMESERVER1=.*|NAMESERVER1=${NAMESERVER1}|g" $TEMP_CUSTOMISE3
sed -i "s|NAMESERVER2=.*|NAMESERVER2=${NAMESERVER1}|g" $TEMP_CUSTOMISE3
sed -i "s|NAMESERVER2=.*|NAMESERVER2=${NAMESERVER2}|g" $TEMP_CUSTOMISE3
sed -i "s|NAMESERVER3=.*|NAMESERVER3=${NAMESERVER3}|g" $TEMP_CUSTOMISE3
sed -i "s|NAMESERVER4=.*|NAMESERVER4=${NAMESERVER4}|g" $TEMP_CUSTOMISE3
sed -i "s|NAMESERVER5=.*|NAMESERVER5=${NAMESERVER5}|g" $TEMP_CUSTOMISE3
sed -i "s|NAMESERVER6=.*|NAMESERVER6=${NAMESERVER6}|g" $TEMP_CUSTOMISE3
sed -i "s|PROJECT_NAME=.*|PROJECT_NAME=${PROJECT_NAME}|g" $TEMP_CUSTOMISE3
sed -i "s|CONFIG_FILENAME=.*|CONFIG_FILENAME=${CONFIG_FILENAME}|g" $TEMP_CUSTOMISE3
sed -i "s|SSH_PUBKEY=.*|SSH_PUBKEY=${SSH_PUBKEY}|g" $TEMP_CUSTOMISE3

View File

@ -62,6 +62,10 @@ BOX_IP_ADDRESS ?= "192.168.1.55"
# DNS
NAMESERVER1 ?= '213.73.91.35'
NAMESERVER2 ?= '85.214.20.141'
NAMESERVER3 ?= '213.73.91.35'
NAMESERVER4 ?= '85.214.73.63'
NAMESERVER5 ?= '8.8.8.8'
NAMESERVER6 ?= '4.4.4.4'
# Using taskset to pin build process to single core. This is a
# workaround for a qemu-user-static issue that causes builds to
@ -75,6 +79,10 @@ MAKE_IMAGE = ARCHITECTURE=$(ARCHITECTURE) MACHINE=$(MACHINE) SOURCE=$(SOURCE) \
BOX_IP_ADDRESS=$(BOX_IP_ADDRESS) \
NAMESERVER1=$(NAMESERVER1) \
NAMESERVER2=$(NAMESERVER2) \
NAMESERVER3=$(NAMESERVER3) \
NAMESERVER4=$(NAMESERVER4) \
NAMESERVER5=$(NAMESERVER5) \
NAMESERVER6=$(NAMESERVER6) \
CUSTOM_SETUP=$(CUSTOM_SETUP) \
IMAGE_SIZE=$(IMAGE_SIZE) taskset 0x01 $(PROJECT_NAME)-image-make $(NAME)

View File

@ -51,6 +51,10 @@ configuration_variables=(FRIENDS_MIRRORS_SERVER
XMPP_DOMAIN_CODE
NAMESERVER1
NAMESERVER2
NAMESERVER3
NAMESERVER4
NAMESERVER5
NAMESERVER6
GET_IP_ADDRESS_URL
DDNS_PROVIDER
DDNS_USERNAME

View File

@ -31,6 +31,10 @@
# DNS
NAMESERVER1='213.73.91.35'
NAMESERVER2='85.214.20.141'
NAMESERVER3='213.73.91.35'
NAMESERVER4='85.214.73.63'
NAMESERVER5='8.8.8.8'
NAMESERVER6='4.4.4.4'
# parameters used when adding a new domain
DDNS_PROVIDER="default@freedns.afraid.org"
@ -193,6 +197,10 @@ function configure_dns {
echo 'search localdomain' >> /etc/resolv.conf
echo "nameserver $NAMESERVER1" >> /etc/resolv.conf
echo "nameserver $NAMESERVER2" >> /etc/resolv.conf
echo "nameserver $NAMESERVER3" >> /etc/resolv.conf
echo "nameserver $NAMESERVER4" >> /etc/resolv.conf
echo "nameserver $NAMESERVER5" >> /etc/resolv.conf
echo "nameserver $NAMESERVER6" >> /etc/resolv.conf
# prevent resolv.conf from changing
chattr +i /etc/resolv.conf

View File

@ -61,7 +61,7 @@ function install_static_network {
echo " address $LOCAL_NETWORK_STATIC_IP_ADDRESS" >> /etc/network/interfaces
echo ' netmask 255.255.255.0' >> /etc/network/interfaces
echo " gateway $ROUTER_IP_ADDRESS" >> /etc/network/interfaces
echo " dns-nameservers $NAMESERVER1 $NAMESERVER2" >> /etc/network/interfaces
echo " dns-nameservers $NAMESERVER1 $NAMESERVER2 $NAMESERVER3 $NAMESERVER4 $NAMESERVER5 $NAMESERVER6" >> /etc/network/interfaces
echo '# Example to keep MAC address between reboots' >> /etc/network/interfaces
echo '#hwaddress ether DE:AD:BE:EF:CA:FE' >> /etc/network/interfaces
echo '' >> /etc/network/interfaces