Test multiple DNS servers with multiple domains

I was using this script to regression test some DNS servers with multiple personalities. All domains are tested on all servers - both private and public.

#!/bin/bash
 
namecheck() {
    echo `date`" checking for $1 @$2"
    ans=`dig $1 A @$2 +recurse +qr +all 2>&1`
    res=`echo -e "$ans" | grep "ANSWER SECTION"`
    if [ -z "$res" ]; then
        echo -e "NO ANSWER FROM $2:\n$ans"
    fi
#    echo -e "$ans" | grep -A 1 "ANSWER SECTION"
}
 
multicheck() {
    domains="$1"
    servers="$2"
 
    for domain in $domains; do
        for server in $servers; do
            namecheck $domain $server
        done
    done
}
 
pubdomains="www.tricon.hu www.sztaki.hu www.index.hu www.origo.hu www.google.co.hu www.slashdot.com www.eastsideboxing.com"
pubservers="193.225.86.1 195.70.57.4 195.111.2.2 195.70.56.227 193.225.12.58"
 
privdomains="kozteka.itak.sztaki.hu stork.oplab.sztaki.hu ilias.ilab.sztaki.hu nat.sztaki.hu ismeretlen.ilab.sztaki.hu"
privservers="195.70.57.4 195.111.2.2"
 
multicheck "$pubdomains" "$pubservers"
multicheck "$privdomains" "$privservers"

Linkbacks

Use the following URL for manually sending trackbacks: http://rigo.info/lib/plugins/linkback/exe/trackback.php/en:blog:test_multiple_dns_servers_with_multiple_domains
en/blog/test_multiple_dns_servers_with_multiple_domains.txt · Utolsó módosítás: 2009-04-14 00:00 (külső szerkesztés)
CC Attribution-Noncommercial-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0