Get the real IP using CDN Web site

Source: Internet
Author: User
Now a lot of Web sites using CDN technology, in doing some testing, want to get its server real IP address is a bit difficult, do not know what other good methods now, sorted out, now know the following two kinds:

1: Take CDN server to find real IP
Cache_peer 1.1.1.1 Parent 0 no-query Originserver
Cache_peer_domain 1.1.1.1 www.2cto.com

2: To determine whether http_x_forwarded_for is empty, not to empty this as an IP address, otherwise obtain REMOTE_ADDR as an IP address.
If the server can upload files, upload the file and add the following code:
Request.ServerVariables ("local_addr") ' Gets the IP address of the server
Request.ServerVariables ("remote_addr") ' Gets the client's IP address/This may be an agent

Request. ServerVariables ("http_x_forwarded_for") ' Gets the real IP address of the requesting client

3: You can find a level two domain name check

can refer to Only_guest method, find a foreign server ping, generally obtained are real IP.

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.