How does CentOS obtain the public IP address from the command line?

Source: Internet
Author: User
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
  1. Sudo yum install curl
Use one of the following commands to obtain the local address: [Html]View plaincopy
  1. Curl http://members.3322.org/dyndns/getip
  2. Curl ip.6655.com/ip.aspx
  3. Curl ifconfig. me
  4. Curl icanhazip.com
  5. Curl ident. me
  6. Curl ipecho.net/plain
  7. Curl whatismyip.akamai.com
  8. Curl myip.dnsomatic.com
  9. # More methods to access ifconfig. co
  10. Wget-qO-ifconfig. co
  11. # Return IP address and region
  12. Curl ip.6655.com/ip.aspx? Area = 1
  13. Curl cip. cc

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.