I found a lot of code to get the client ip address, but the access under the vro always shows the private ip address of 192. 168. *. *.

Source: Internet
Author: User
I found a lot of code to get the client ip address, but the access under the router always shows 192. 168. *. * If you want to write an example of determining the city based on the ip address, you can find a lot of code to get the client ip address. However, access under the vro always shows 192. 168. *. * How can I obtain the public ip address at the vro level after changing the private ip address... Please help


Reply to discussion (solution)

The router must support the transparent bridge mode.

How can we implement the program? it's not about changing the hardware...

The router must support the transparent bridge mode. how can it be implemented in the program? it is not necessary to change the hardware...

What do you do if the program cannot be implemented or the router does not give you?

What do you do if the program cannot be implemented or the router does not give you?
So how do people know the city in which you are located in 58 cities and Sina...

You only need to configure the ingress router to the transparent bridge mode or the bridge mode with weak functions.

REMOTE_ADDR obtains the public IP address. the landlord should test it in a local environment to display the intranet IP address. put the code on the public network and output it.

REMOTE_ADDR obtains the public IP address. the landlord should test it in a local environment to display the intranet IP address. put the code on the public network and output it.
I think the same is true, but there is no place to test it. thank you so much for O (lead _ lead) O.


REMOTE_ADDR obtains the public IP address. the landlord should test it in a local environment to display the intranet IP address. put the code on the public network and output it.
I think the same is true, but there is no place to test it. thank you so much for O (lead _ lead) O.

Buy a virtual host or find some free virtual hosts,
If it doesn't work, you can create a dynamic dns and map the port on the vro to the intranet host.

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.