xnstool 一條curl 獲取ip地址和dns配置

[root@sigapore2 ~]# curl "http://1074357303-888321920-fastweb.pbt.cloudxns.net/fast_tools/display_ldns_diag_client.php?l=zh-cn"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>客戶端dns檢測 </title>
</head>
<body>
<style>
.dns{font-size:14px;line-height: 30px; margin: 0 0 30px 0;color: #666;}
.dns th{color: #0090f4;text-align: right;font-weight: 400;white-space: nowrap;}
.dns td{padding: 0 0 0 20px;white-space: nowrap;}
.result{font-size:14px;line-height: 30px;color: #0090f4; }
.advice{font-size:14px; line-height: 30px; margin: 0 0 30px 0; color: #666;}
.advice td{ padding: 0 30px 0 0; white-space: nowrap;}
.tips h4{color: #0090f4;font-size:14px; line-height: 30px;font-weight: 400;}
.tips p{color: #666;font-size:14px; line-height: 24px;}
</style>
    <pre>
    <table border="0" cellpadding="0" cellspacing="0" class="dns">
        <tr>
            <th>您的IP:</th>
            <td width="128" >116.251.211.183</td>
            <td>境外_新加坡</td> 
        </tr>
        <tr>
            <th>您的DNS:</th>
            <td width="128" >116.251.208.254</td>
            <td>境外_新加坡</td> 
        </tr>
    </table>
    </pre>
    <p class="result">您的DNS配置正確! </p>
</body>
</html>

ip地址好得到,不過不知道dns它是怎麼搞到的,而且上面的還搞錯了

[root@sigapore2 ~]# cat /etc/resolv.conf 
nameserver 116.251.208.201
nameserver 116.251.208.202
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章