xoops forums

fabou78

Friend of XOOPS
Posted on: 9/26 15:59
fabou78
fabou78 (Show more)
Friend of XOOPS
Posts: 37
Since: 2012/6/16
#1

How is IP filtering/ban done in XOOPS protector?

My provider have upgraded their platform and now we sit behind a load balancer or firewall. This has the consequences that the web server we are on will always the same IP address.

During testing I wanted to open access only to me and was forced to use XFF in .htaccess rather that the traditional require ip.

SetEnvIF X-Forwarded-For "1.1.1.1" AllowIP

<RequireAny>
    Require 
env AllowIP
</RequireAny>


Would the IP filtering mechanism in XOOPS based on XFF by any chances?

geekwright

Quite a regular
Posted on: 9/29 3:35
geekwright
geekwright (Show more)
Quite a regular
Posts: 270
Since: 2010/10/15
#2

Re: How is IP filtering/ban done in XOOPS protector?

The IP used by protector is resolved in \Xmf\IPAddress::fromRequest(). Unfortunately, it is not using X-Forwarded-For at the moment.

RFC 7239 looks promising, but XFF seems to still be the defacto standard. It should be supported here. I will add a ticket to add support for it, and it will be part of 2.5.11 - coming soon.

Edit: ticket is here: https://github.com/XOOPS/xmf/issues/64

fabou78

Friend of XOOPS
Posted on: 10/7 8:52
fabou78
fabou78 (Show more)
Friend of XOOPS
Posts: 37
Since: 2012/6/16
#3

Re: How is IP filtering/ban done in XOOPS protector?

Indeed RFC 7239 look goods. I though that XFF was a already a standard but as per RFC it is not.

Thanks for this,