rejetto forum

Get real ip address using CloudFlare

0 Members and 1 Guest are viewing this topic.

Offline ihhoorr

  • Occasional poster
  • *
    • Posts: 2
    • View Profile
How can I get the real ip address from the user, when using CloudFlares service?

I need the real ip for the user connecting

Document :

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13517
    • View Profile
Consider i DON'T know this cloudflare.
From what i can read from the documentation, they support the "X-Forwarded-For" field, and so does HFS.
For security reasons HFS by default accepts this field only if coming from the same computer (
THEN: if cloudflare works locally on your computer, then it should automatically work with HFS.
If cloudflare service is connecting to your computer over the net, then it is not working and you need to do this:
1. menu > save options > to file
you now have a hfs.ini file
2. edit hfs.ini and search for the line starting with "forwarded-mask="
3. now you should add the allowed addresses, all separated by semicolon ";" like
this last part is slightly complicated because you may not know what addresses to add.
My advice is to start with
just for testing. This should work, but it's very unsecure, so DON'T KEEP IT for long.
If this doesn't work it's useless to go on, as it should give permission to ALL addresses.
If it is working, then you should enter all the addresses to allow.
I guess, from the documentation, that these addressess are listed at
but the syntax is not the same used by HFS.
If you are not an expert and don't know how to do, you can make it simple by replacing all those addresses like in this example:
This address
will become 199.27.*
i just removed last 3 numbers, as you can see.
Do the same with the others, and remember to separated them with ;
you have to manually edit HFS options to

Offline LeoNeeson

  • Tireless poster
  • ****
    • Posts: 852
  • Status: On hiatus (sporadically here)
    • View Profile
As far I know, CloudFlare is some kind of "layer", between your server and a domain. Unless you are running HFS on a VPS, and that VPS has Cloudflare enabled as external IP (or something similar), I find your configuration hard to understand. ihhoorr: Can you give us more details?...
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
» Currently taking a break, until HFS v2.4 get his stable version.

Offline bmartino1

  • Tireless poster
  • ****
    • Posts: 911
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link

it local ran dns client program, your paying to much for a silly product...

since it on your machine, its your public IP
Shows your public IP

the program run on your computer takes that public ip that you use for the internet and makes it a DNS name....

ITs just NAT and DNS....

Files I have snagged and share can be found on my google drive: