bypass cloudflare server ip

Status
Not open for further replies.

rave

New member
hello guys

i need some trick in my site. my users ip is not visible to me because my one site is hidden besides cloudflare as i am using cloudflare in my one site. so it is tough for me to check my users ip because it shows cloudflare server ip

anybody have idea if i use some code then it will bypass cloudflare server ip

will this work if i use it in .htaccess file


IfModule cloudflare_module
CloudFlareRemoteIPHeader X-Forwarded-For
CloudFlareRemoteIPTrustedProxy [207.180.216.161]
DenyAllButCloudFlare /IfModule
 

blanewaxman

New member
Code:
$.get('https://www.cloudflare.com/cdn-cgi/trace', function(data) { console.log(data) })

Here's another solution from ipify:

Code:
$.getJSON("https://api.ipify.org/?format=json", function(e) {
console.log(e.ip);
});

All of these seem like they would be pretty straight forward. Javascript runs on the client side so a savvy user could spoof the IP. A security savvy person might be running something like no-script.

Here's another script that you can use to you don't have to query any remote sites:

https://ourcodeworld.com/articles/read/257/how-to-get-the-client-ip-address-with-javascript-only
 

rave

New member
XJyoyxW.jpg
 
Status
Not open for further replies.