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
9
# This is a basic Deadwood test to make sure it works
11
killall maradns > /dev/null 2>&1 # Don't run this test on Solaris
14
cat > mararc-IPv6 << EOF
16
ipv4_bind_addresses="127.0.0.2"
17
ipv6_bind_address="fd4d:6172:6144:4e53::2"
19
csv2["example.com."] = "db.example.com"
23
cat > db.example.com << EOF
25
black4.% A 10.222.33.44
26
black6.% AAAA fd4d:6172:6144:4e53::3
27
good.% AAAA fd4d:6172:6144:4e53::2
31
../../../server/maradns -f mararc-IPv6 > /dev/null 2>&1 &
32
#../../../server/maradns -f mararc-IPv6 &
35
# Now, make sure Deadwood's ip_blacklist works
37
for BLACKLIST in 10.222.33.44 fd4d:6172:6144:4e53::3 ; do
41
bind_address="fd4d:6172:6144:4e53::1"
43
upstream_servers["."]="fd4d:6172:6144:4e53::2"
44
recursive_acl="::1/128, fd4d:6172:6144:4e53::0/32"
45
ip_blacklist="${BLACKLIST}"
49
../../src/Deadwood -f dwood2rc | grep -v version | sed 's/forwarder/cache/' &
52
echo Blacklist: ${BLACKLIST}
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}'
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}'
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}'
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}'
85
killall maradns.authonly
89
ifconfig lo del fd4d:6172:6144:4e53::1
90
ifconfig lo del fd4d:6172:6144:4e53::2