Public IP in sessions database when behind HAProxy

classic Classic list List threaded Threaded
2 messages Options
Dan
Reply | Threaded
Open this post in threaded view
|

Public IP in sessions database when behind HAProxy

Dan
Good morning all,

We use MySQL to store sessions for Roundcube, which is functioning fine.
However, I've noticed that the 'ip' field in the 'sessions' table only
stores the public IP of the HAProxy server. I have a feeling this might
be just a simple configuration change, however I've looked through
defaults.inc.php and couldn't find anything that relates to this. I did
try setting the array for

$config['proxy_whitelist']

in hopes that it would extract the X_FORWARDED_FOR header. It still
seems to log the HAProxy servers public IP.

Is there a way to change this behavior, and if not, why?

Thank you.
_______________________________________________
Roundcube Users mailing list
[hidden email]
http://lists.roundcube.net/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Public IP in sessions database when behind HAProxy

@lbutlr
On 14 Jan 2020, at 08:38, Dan <[hidden email]> wrote:
> We use MySQL to store sessions for Roundcube, which is functioning fine. However, I've noticed that the 'ip' field in the 'sessions' table only stores the public IP of the HAProxy server. I have a feeling this might be just a simple configuration change, however I've looked through defaults.inc.php and couldn't find anything that relates to this. I did try setting the array for
>
> $config['proxy_whitelist']
>
> in hopes that it would extract the X_FORWARDED_FOR header. It still seems to log the HAProxy servers public IP.
>
> Is there a way to change this behavior, and if not, why?

I think you might need to do this via dovcot and a bash script.

<https://wiki.dovecot.org/PostLoginScripting>



--
Hudd: 'I've just done this radio show where I never met any of the
        other actors and I didn't understand what any of it was about'
        Moore: 'Ah, yes I expect that's the thing I'm in.’
_______________________________________________
Roundcube Users mailing list
[hidden email]
http://lists.roundcube.net/mailman/listinfo/users