close


因為有個script查DNS是否正常連線
ispgoogle_dns.sh

#!/bin/sh
ispdns() {
    host -t ns hinet.net | awk '{print $NF}'
    host -t ns seed.net.tw | awk '{print $NF}'
    host -t ns giga.net.tw | awk '{print $NF}'
    host -t ns tfn.net.tw | awk '{print $NF}'
    host -t ns so-net.net.tw | awk '{print $NF}'
    host -t ns sparqnet.net | awk '{print $NF}'
}

for i in `ispdns`
do
    IP=`host $i | awk '/address/ {print $NF}'`
    if [ `host
www.google.com.tw $i | grep -c address` = 3 ] ; then
        echo $i $IP OK
    else
        echo $i $IP failed
    fi
done




* net-dns/bind-tools
     Available versions:  9.4.1_p1 9.4.2_p2 ~9.4.3 ~9.5.0_p2
     Homepage:            http://www.isc.org/products/BIND/bind9.html
     Description:         bind tools: dig, nslookup, host, nsupdate, dnssec-keygen

會出現host commend not found
查了一下
emerge bind-tools

arrow
arrow
    全站熱搜

    peicheng 發表在 痞客邦 留言(0) 人氣()