~ubuntu-branches/ubuntu/trusty/maradns/trusty-proposed

« back to all changes in this revision

Viewing changes to deadwood-3.2.02/sqa/dwood2rc_s_ip_blacklist/do.test

  • Committer: Package Import Robot
  • Author(s): Dariusz Dwornikowski
  • Date: 2014-02-16 19:36:04 UTC
  • mfrom: (1.2.11) (21.1.11 experimental)
  • Revision ID: package-import@ubuntu.com-20140216193604-xtmcopn9pilzszae
Tags: 2.0.09-1
* New maintainer (Closes: #739084)
* New upstream release to unstable
* Several security bugs (Closes: #739755)
   - security bugfix for CVE-2011-5055, CVE-2011-5056, CVE-2012-0024,
   CVE-2012-1570
   - security bugfix agains blind spoofing attack (no CVE number)
   - security bugfix for packet of death attack (no CVE number)
* Bump standards to 3.9.5
* Updated d/postinst to no longer modify conffiles (Closes: #710903)
* Init script fixed (Closes: #709826)
* --reinstall no longer kills the process (Closes: #701657)
* Updated old d/changelog entries, added information when the CVEs were
  fixed: 2.0.06-1, 2.0.04-1, 1.4.11-1, 1.2.12.06-1, 1.2.12.05-1, 1.0.28-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
# Give localhost the fd4d:6172:6144:4e53::1 + fd4d:6172:6144:4e53::2 addresses;
4
 
# addresses come from RFC4193
5
 
ifconfig lo add fd4d:6172:6144:4e53::1
6
 
ifconfig lo add fd4d:6172:6144:4e53::2
7
 
sleep 2
8
 
 
9
 
# This is a basic Deadwood test to make sure it works
10
 
 
11
 
killall maradns > /dev/null 2>&1 # Don't run this test on Solaris
12
 
sleep 2
13
 
 
14
 
cat > mararc-IPv6 << EOF
15
 
chroot_dir="$( pwd )"
16
 
ipv4_bind_addresses="127.0.0.2"
17
 
ipv6_bind_address="fd4d:6172:6144:4e53::2"
18
 
csv2 = {}
19
 
csv2["example.com."] = "db.example.com"
20
 
EOF
21
 
 
22
 
 
23
 
cat > db.example.com << EOF
24
 
www.% A 10.1.2.3
25
 
black4.% A 10.222.33.44
26
 
black6.% AAAA fd4d:6172:6144:4e53::3
27
 
good.% AAAA fd4d:6172:6144:4e53::2
28
 
EOF
29
 
 
30
 
# OK, test the server
31
 
../../../server/maradns -f mararc-IPv6 > /dev/null 2>&1 &
32
 
#../../../server/maradns -f mararc-IPv6 &
33
 
sleep 1
34
 
 
35
 
# Now, make sure Deadwood's ip_blacklist works
36
 
 
37
 
for BLACKLIST in 10.222.33.44 fd4d:6172:6144:4e53::3 ; do
38
 
 
39
 
cat > dwood2rc << EOF
40
 
chroot_dir="$( pwd )"
41
 
bind_address="fd4d:6172:6144:4e53::1"
42
 
upstream_servers = {}
43
 
upstream_servers["."]="fd4d:6172:6144:4e53::2"
44
 
recursive_acl="::1/128, fd4d:6172:6144:4e53::0/32"
45
 
ip_blacklist="${BLACKLIST}"
46
 
filter_rfc1918 = 0
47
 
EOF
48
 
 
49
 
../../src/Deadwood -f dwood2rc | grep -v version | sed 's/forwarder/cache/' &
50
 
sleep 3
51
 
 
52
 
echo Blacklist: ${BLACKLIST}
53
 
 
54
 
echo
55
 
dig @fd4d:6172:6144:4e53::1 www.example.com A | \
56
 
        grep -v DiG | grep -v WHEN | grep -v time | \
57
 
        grep -v 'recursion requested but not available' | \
58
 
        grep -v HEADER | grep -v 'global options' | awk '
59
 
                /example.com/ {gsub(/86[0-9][0-9][0-9]/,"")} {print}'
60
 
echo
61
 
dig @fd4d:6172:6144:4e53::1 black4.example.com A | \
62
 
        grep -v DiG | grep -v WHEN | grep -v time | \
63
 
        grep -v 'recursion requested but not available' | \
64
 
        grep -v HEADER | grep -v 'global options' | awk '
65
 
                /example.com/ {gsub(/86[0-9][0-9][0-9]/,"")} {print}'
66
 
echo
67
 
dig @fd4d:6172:6144:4e53::1 black6.example.com AAAA | \
68
 
        grep -v DiG | grep -v WHEN | grep -v time | \
69
 
        grep -v 'recursion requested but not available' | \
70
 
        grep -v HEADER | grep -v 'global options' | awk '
71
 
                /example.com/ {gsub(/86[0-9][0-9][0-9]/,"")} {print}'
72
 
echo
73
 
dig @fd4d:6172:6144:4e53::1 good.example.com AAAA | \
74
 
        grep -v DiG | grep -v WHEN | grep -v time | \
75
 
        grep -v 'recursion requested but not available' | \
76
 
        grep -v HEADER | grep -v 'global options' | awk '
77
 
                /example.com/ {gsub(/86[0-9][0-9][0-9]/,"")} {print}'
78
 
echo
79
 
 
80
 
killall Deadwood
81
 
sleep 2
82
 
 
83
 
done
84
 
 
85
 
killall maradns.authonly
86
 
rm mararc-*
87
 
rm db.example.com
88
 
rm dwood2rc
89
 
ifconfig lo del fd4d:6172:6144:4e53::1
90
 
ifconfig lo del fd4d:6172:6144:4e53::2