Recently, the server is configured locally and the home bandwidth does not have a fixed IP address. Therefore, you must obtain your own public IP address. The server version of CentOS6.5 is naturally unable to obtain the public IP address through browser access. Therefore, record some methods for getting public IP addresses from the command line. First, you must follow the curl: [plain] viewplaincopy
Recently, the server is configured locally and the home bandwidth does not have a fixed IP address. Therefore, you must obtain your own public IP address.
The server version of CentOS 6.5 is naturally unable to obtain the public IP address through browser access.
Therefore, record some methods for getting public IP addresses from the command line.
First, you need to follow the curl on the machine:
[Plain]View plaincopy
- Sudo yum install curl
Use one of the following commands to obtain the local address:
[Html]View plaincopy
- Curl http://members.3322.org/dyndns/getip
- Curl ip.6655.com/ip.aspx
- Curl ifconfig. me
- Curl icanhazip.com
- Curl ident. me
- Curl ipecho.net/plain
- Curl whatismyip.akamai.com
- Curl myip.dnsomatic.com
- # More methods to access ifconfig. co
- Wget-qO-ifconfig. co
- # Return IP address and region
- Curl ip.6655.com/ip.aspx? Area = 1
- Curl cip. cc