Linux命令行獲取本機外網IP地址


問題:

服務器地址為net映射地址,本機ifconfig無法直接獲取映射的公網地址。

方法:

[root@TiaoBan-1 nidongde]# curl ip.sb
50.1xx.2xx.18


其他網址訪問:

$ curl ip.sb
$ curl cip.cc
$ curl ifconfig.me $ curl icanhazip.com $ curl ident.me $ curl ipecho.net
/plain


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM