简体   繁体   中英

Using Javascript to find server's true IP address

I am using a reverse proxy to help protect my site from DDoS but I'm wondering if there is ways to use Javascript to trick my server into giving it's true IP address, would anyone know of a script that could do this as the occasional DDoS still happens and I'm thinking this is how they're finding the true location.

Not directly generically, no. The browser doesn't know or care what's on the other side of the server it connects to. (You of course could write a script that exposes your server's actual origin, or include header information, etc.)

However, this doesn't address your problem. If you're actually worried about DDoS, it doesn't really matter if what is getting hit is your proxy or the servers on the other side of it. In fact, depending on your configuration, you're just doubling your load because now you have to deal with the proxied connections.

Additionally, if you really want to put a proxy in front of your application's servers, those servers shouldn't be accessible outside of some private network between them and the proxy. That is, they shouldn't have a public IP address at all.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM