The issue
Hi everyone,
I’m running a Flarum forum that’s behind Cloudflare, and I’ve noticed that the IP addresses shown in posts and logs are Cloudflare’s IPs instead of the real client IPs. I’d like to know what’s the best way to configure Flarum (or the server) so that I can see the actual IP address of the user when needed, for example, to moderate certain content. Is there a recommended way or an extension to make Flarum recognize the real IP?
Flarum information
Flarum core: 1.8.9
PHP version: 8.2.6
MySQL version: 8.0.40-0ubuntu0.22.04.1
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache
+----------------------------------------+---------+--------+
| Flarum Extensions | | |
+----------------------------------------+---------+--------+
| ID | Version | Commit |
+----------------------------------------+---------+--------+
| flarum-flags | v1.8.2 | |
| flarum-tags | v1.8.3 | |
| flarum-approval | v1.8.2 | |
| flarum-mentions | v1.8.5 | |
| flarum-subscriptions | v1.8.1 | |
| afrux-forum-widgets-core | v0.1.7 | |
| fof-follow-tags | 1.2.8 | |
| flarum-suspend | v1.8.4 | |
| sycho-profile-cover | v1.3.5 | |
| migratetoflarum-canonical | 1.0.0 | |
| justoverclock-welcomebox | 2.0.2 | |
| justoverclock-custom-html-widget | 0.1.4 | |
| ianm-html-head | 1.2.4 | |
| ianm-follow-users | 1.4.11 | |
| fof-user-bio | 1.4.2 | |
| fof-sitemap | 2.2.1 | |
| fof-share-social | 1.2.0 | |
| fof-recaptcha | 1.3.4 | |
| fof-nightmode | 1.6.0 | |
| fof-moderator-notes | 1.3.0 | |
| fof-ignore-users | 1.2.1 | |
| fof-gamification | 1.6.8 | |
| fof-formatting | 1.0.3 | |
| fof-disposable-emails | 1.0.0 | |
| fof-cookie-consent | 1.1.3 | |
| fof-best-answer | 1.6.3 | |
| fof-analytics | 1.1.0 | |
| flarum-sticky | v1.8.2 | |
| flarum-statistics | v1.8.1 | |
| flarum-nicknames | v1.8.2 | |
| flarum-markdown | v1.8.1 | |
| flarum-lock | v1.8.2 | |
| flarum-lang-italian | 1.17.0 | |
| flarum-emoji | v1.8.1 | |
| flarum-bbcode | v1.8.0 | |
| clarkwinkelmann-no-email-notifications | 1.0.0 | |
| clarkwinkelmann-first-post-approval | 1.0.1 | |
+----------------------------------------+---------+--------+