Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

check SOA records with zsh and dig +short

 x ~ % which soacheck
soacheck () {
        which dig > /dev/null || {
                echo "install dig"
                return 1
        }
        [ "$#" -eq 1 ] || {
                echo "Usage: $0 <dns-zone>"
                return 1
        }
        for i in $(dig $1 NS +short)
        do
                echo -ne "$i\n\t"
                dig $1 SOA @$i +short
        done
}

x ~ % soacheck xmw.de
vuxu.org.
lore.xmw.de. root.xmw.de. 2013080105 86400 10800 604800 3600
spot.xmw.de.
lore.xmw.de. root.xmw.de. 2013080105 86400 10800 604800 3600
lore.xmw.de.
lore.xmw.de. root.xmw.de. 2013080105 86400 10800 604800 3600

x ~ % soacheck spf.fs.lmu.de
huygens.fs.lmu.de.
pauli.fs.lmu.de. root.fs.lmu.de. 2013080631 86400 10800 604800 3600
spot.xmw.de.
pauli.fs.lmu.de. root.fs.lmu.de. 2013080630 86400 10800 604800 3600
lee.fs.lmu.de.
pauli.fs.lmu.de. root.fs.lmu.de. 2013080631 86400 10800 604800 3600
lore.xmw.de.
pauli.fs.lmu.de. root.fs.lmu.de. 2013080630 86400 10800 604800 3600

[1] https://xmw.de/dotfiles/.zshrc
Tags: linux own
Reposted bygaf gaf

Don't be the product, buy the product!

Schweinderl