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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值