This file is indexed.

/usr/lib/plainbox-providers-1/checkbox/bin/dns_server_test is in plainbox-provider-checkbox 0.3-2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/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