最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

詳解幾種Linux 查詢外網(wǎng)出口IP命令的方法

 更新時(shí)間:2017年03月16日 09:28:28   作者:Felix運(yùn)維  
本篇文章主要介紹了詳解幾種Linux 查詢外網(wǎng)出口IP的方法,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧

Curl 純文本格式輸出:

curl icanhazip.com
curl ifconfig.me
curl curlmyip.com
curl ip.appspot.com
curl ipinfo.io/ip
curl ipecho.net/plain
curl www.trackip.net/i

curl JSON格式輸出:

curl ipinfo.io/jsoncurl ifconfig.me/all.jsoncurl www.trackip.net/ip?json 

curl XML格式輸出:

curl ifconfig.me/all.xml

curl 得到所有IP細(xì)節(jié) (挖掘機(jī))

curl ifconfig.me/all

使用 DYDNS (當(dāng)你使用 DYDNS 服務(wù)時(shí)有用)

curl -s 'http://checkip.dyndns.org' | sed 's/.*Current IP Address: \([0-9\.]*\).*/\1/g'
curl -s http://checkip.dyndns.org/ | grep -o "[[:digit:].]\+" 

使用 Wget 代替 Curl

wget http://ipecho.net/plain -O - -q ; echo
wget http://observebox.com/ip -O - -q ; echo

使用 host 和 dig 命令

如果有的話,你也可以直接使用 host 和 dig 命令。

host -t a dartsclink.com | sed 's/.*has address //'
dig +short myip.opendns.com @resolver1.opendns.com 

bash 腳本示例:

#!/bin/bash
PUBLIC_IP=`wget http://ipecho.net/plain -O - -q ; echo`
echo $PUBLIC_IP

以上就是本文的全部內(nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論

桐庐县| 绍兴县| 常熟市| 天长市| 漠河县| 西安市| 大埔县| 宁河县| 静海县| 麻栗坡县| 剑阁县| 玉屏| 昔阳县| 清苑县| 三原县| 长顺县| 灵武市| 杂多县| 连城县| 沙田区| 双流县| 天长市| 六安市| 平阳县| 丘北县| 逊克县| 福安市| 收藏| 土默特左旗| 郴州市| 融水| 沁源县| 巧家县| 越西县| 新宁县| 应城市| 长顺县| 定南县| 上栗县| 闻喜县| 罗甸县|