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

首頁 > 系統 > Linux > 正文

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

2024-08-28 00:02:41
字體:
來源:轉載
供稿:網友

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

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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 明水县| 渝中区| 河东区| 固镇县| 顺义区| 龙门县| 美姑县| 正安县| 吉林省| 乌审旗| 金平| 连平县| 潜江市| 尼木县| 分宜县| 成都市| 玉屏| 新平| 威宁| 万源市| 永德县| 安顺市| 安乡县| 武穴市| 浙江省| 宁武县| 玉门市| 和林格尔县| 鹰潭市| 五寨县| 福海县| 澄江县| 宜丰县| 嫩江县| 德庆县| 城固县| 原阳县| 手游| 宝山区| 黄平县| 朔州市|