borinet Posted January 21, 2023 Posted January 21, 2023 Hello. I'm using cloudflare. Something went wrong. The user's IP is not correct. Is it possible to get the user's Real IP? Quote
0 BruT Posted January 21, 2023 Posted January 21, 2023 (edited) thats pc ip in the inner network Edited January 21, 2023 by BruT 1 Quote
0 Nightw0lf Posted January 21, 2023 Posted January 21, 2023 quick answer is no quick explanation is that cloudflare believes and supports that ipv6 ips should be used instead because ipv4 ip's are ending, so they allow you to use ipv4 only on paid plans hence the reason they use dummy ip's for your visitors also another reason is that you have this conflict since l2 is not recognizing ipv6 Quote
0 BruT Posted January 22, 2023 Posted January 22, 2023 (edited) 1 hour ago, Nightw0lf said: quick answer is no quick explanation is that cloudflare believes and supports that ipv6 ips should be used instead because ipv4 ip's are ending, so they allow you to use ipv4 only on paid plans hence the reason they use dummy ip's for your visitors also another reason is that you have this conflict since l2 is not recognizing ipv6 did i say something incorrect? Edited January 22, 2023 by BruT Quote
0 Berserkd Posted January 22, 2023 Posted January 22, 2023 (edited) 9 hours ago, BruT said: did i say something incorrect? yup that's not private IP, that's public ipv4 but as @Nightw0lf said it seems to be some kind of dummy cloudflare ipv4 address Edited January 22, 2023 by Berserkd Quote
0 BruT Posted January 22, 2023 Posted January 22, 2023 (edited) 52 minutes ago, Berserkd said: yup that's not private IP, that's public ipv4 but as @Nightw0lf said it seems to be some kind of dummy cloudflare ipv4 address the client usually sends a trace and 172 starting ips are usually private network ips, maybe i am wrong idk Edited January 22, 2023 by BruT 1 Quote
0 Berserkd Posted January 23, 2023 Posted January 23, 2023 On 1/22/2023 at 7:39 AM, BruT said: the client usually sends a trace and 172 starting ips are usually private network ips, maybe i am wrong idk No, maybe you're getting confused with the 192.* starting IPs, that octet is reserved for LAN as far as I remember ^^ Quote
0 borinet Posted January 24, 2023 Author Posted January 24, 2023 Can I get the ip using httpservletrequest? or Servlet String externalIp = "127.0.0.1"; try { final URL autoIp = new URL("http://ip1.dynupdate.no-ip.com:8245/"); try (BufferedReader in = new BufferedReader(new InputStreamReader(autoIp.openStream()))) { externalIp = in.readLine(); } } catch (IOException e) { } player.sendMessage("Your IP address is " + externalIp); I tried this. But this outputted the server's ip. Is it possible to outputted the user's ip? Quote
Question
borinet
Hello.
I'm using cloudflare.
Something went wrong. The user's IP is not correct.
Is it possible to get the user's Real IP?
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.