xnstool 一条curl 获取ip地址和dns配置

来源:互联网 发布:国际版淘宝怎么样 编辑:程序博客网 时间:2024/06/03 23:46
[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.201nameserver 116.251.208.202
原创粉丝点击