Reverse Proxy IP Header selection not working

Started by JazzyNL, February 09, 2023, 07:39:00 AM

Previous topic - Next topic

MarckMabimods

Quote from: Aleksi on March 11, 2023, 11:52:17 AMSo, I replicated all of this in my test environment. I could not get SMF to fix the IP, I was however fairly easily able to get Apache to fix the IP before it ever gets to SMF. This is probably something along the lines of what Arantor's host is doing. hxxp:httpd.apache.org/docs/2.4/mod/mod_remoteip.html [nonactive]

I was able to do a similar workaround with Nginx to get this problem fixed. In my case I have both Cloudlare, and another server on-prem doing a reverse proxy to the SMF server.

Nginx config setting:

set_real_ip_from 127.0.0.1/32;
real_ip_header CF-Connecting-IP;



JazzyNL

So it has been one year since this was reported. While I appreciate all developing work on SMF and understand work is prioritized, could someone please give me an indication if this is going to be addressed in let's say the next year?

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


Arantor

Well, it's tagged for 2.1.5 and has been since last summer. In theory it could even have been solved in time for 2.1.4 but apparently it's too hard to solve.

I'd have thought the usual approach of 'let's just make everything configurable by the user and make it their choice' would have been wonderful here.

JazzyNL

If it worked, it would've been great. :) Funny thing is that the default behavior in 2.0.x worked fine, the configuration with the drop-down list in 2.1.x broke things. Besides the fact that we can't ban on IP anymore, our users frequently hit rate limits since SMF sees all traffic coming from the same IP address. When you hit that error while trying to post, and click Back to return to the previous page, the text that you had typed is now lost.

Our users are frustrated and as the admin I get it completely. Anyway, appreciate the effort in getting this resolved.

szinski

I got my 2.1 forum working with Cloudflare (displaying client's real IP address) following these instructions (I'm using cPanel)

https://support.cpanel.net/hc/en-us/articles/360051107513-Restoring-visitors-IP-with-mod-remoteip

Advertisement: