返回顶部

pzzning

导航

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

posted on 2018-06-19 14:21  pzzning  阅读(5537)  评论(0编辑  收藏  举报