国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

詳解幾種Linux 查詢外網出口IP命令的方法

2019-11-02 16:05:18
字體:
來源:轉載
供稿:網友

Curl 純文本格式輸出:

curl icanhazip.comcurl ifconfig.mecurl curlmyip.comcurl ip.appspot.comcurl ipinfo.io/ipcurl ipecho.net/plaincurl 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細節 (挖掘機)

curl ifconfig.me/all

使用 DYDNS (當你使用 DYDNS 服務時有用)

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 ; echowget 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/bashPUBLIC_IP=`wget http://ipecho.net/plain -O - -q ; echo`echo $PUBLIC_IP

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 新余市| 涿州市| 邛崃市| 吉安县| 永春县| 萨迦县| 邳州市| 班戈县| 松原市| 东城区| 新化县| 陆良县| 磐石市| 宜良县| 罗江县| 诸城市| 三明市| 侯马市| 黄浦区| 浏阳市| 天气| 湘阴县| 洮南市| 沈丘县| 滦南县| 禹城市| 安西县| 太原市| 南陵县| 合川市| 柳江县| 柘城县| 辉县市| 巫溪县| 原阳县| 揭西县| 陇南市| 巴彦县| 桐乡市| 抚顺县| 梨树县|