From 8a864c7d996a33c347178fa3c512152af6287b96 Mon Sep 17 00:00:00 2001 From: Sylvain Pineau Date: Mon, 13 Jul 2020 10:43:52 +0200 Subject: bin:dns_server_test: Deleted --- bin/dns_server_test | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100755 bin/dns_server_test diff --git a/bin/dns_server_test b/bin/dns_server_test deleted file mode 100755 index 1b29595..0000000 --- a/bin/dns_server_test +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -# -# Verify dns server setup -# Packages and ports can be verified offline but external connections -# require a network connection. The script will check for this. -# - -# Verify process is running. Expected output 'pgrep named' is a $pid -check=`pgrep named` -if [ -z "$check" ]; then - echo "FAIL: DNS bind is not running." - exit 1 -fi - -# Check ports -result1=`host www.ubuntu.com localhost | grep "#53"` -result2=`host -T -6 www.ubuntu.com ip6-localhost | grep "#53"` -if [ -z "$result1" ]; then - echo "FAIL: DNS is not using port 53." - exit 1 -elif [ -z "$result2" ]; then - echo "FAIL: DNS is not using port 53 on IPv6." - exit 1 -fi - -# Check if udp is established -udpCheck=`netstat -auvpn | egrep '(:53)' |egrep 'udp'` -if [ -z "$udpCheck" ]; then - echo "FAIL: DNS udp setup is not established." - exit 1 -fi - -# Check if external dns queries work but first verify the network -# is up and running -check=`ping -c 2 www.ubuntu.com |grep "2 received"` -if [ -n "$check" ]; then - failure="2(SERVFAIL)" - result1=`host www.ubuntu.com localhost | grep "SERVFAIL" |awk '{print $5}'` - result2=`host -T -6 www.ubuntu.com ip6-localhost | grep "SERVFAIL" |awk '{print $5}'` - if [ "$result1" = $failure ]; then - echo "FAIL: DNS external connection fails." - exit 1 - elif [ "$result2" = $failure ]; then - echo "FAIL: DNS external connection via IPv6 fails." - exit 1 - fi -fi - -exit 0 -- cgit v1.2.3