Open mflage opened 9 months ago
The first issue, regarding data transfers, is covered in the FAQ section, at the end of the documentation, hopefully.
The second issue, regarding <IfClass>
, pertains to the module ordering. You do want the mod_ifsession
module to the be last module listed. The documentation isn't quite clear on this, since the module ordering depends on specific features/functionality provided by different modules; not all modules are the same.
In this particular case, I think your modules.conf
should end with:
LoadModule mod_proxy_protocol.c
# keep this module the last one
LoadModule mod_ifsession.c
This way, mod_ifsession
will be the first module to handle incoming connections -- and will apply/handle any <IfClass>
sections because of that; this module does not read any data from the TCP connection. Next, mod_proxy_protocol
would handle the connection event, would read the PROXY header, and do its thing.
Hope this helps!
I've just installed the mod_proxy_protocol module, but having problems getting this working.
I have been able to get the PROXY header parsing working and I can see that the control data stream is working fine, but the problem comes when I try the data part of it (listing, downloading and so on).
The first problem comes with plain-text ftp sessions, where the entering passive mode ip address needs to be rewritten. If I use masqueradeaddress and set this to the ip address of the proxy server, then my firewall blocks it on the way from the ftp server to the proxy. But if I don't set masqueradeaddress and then just let the private, non-routable ip be present in that packet, then my firewall blocks that on the outside interface.
So I then wanted to resort to using TLS to hide this information from the fw, so I configured up TLS and got to the same point. I can authenticate, but when I attempt to list anything, it stops. When looking at the tls.log I see the following:
If I connect directly to the server without using the proxy server, then tls works just fine, so it has to be the proxy thing messing things up.
Here's my relevant config:
haproxy:
Relevant proftpd configuration:
In modules.conf I have this at the bottom of the file:
Another note, I tried using the class and ifclass to restrict where to load the proxy or not and that seems to not stick at all. I'm not sure if I've missed something here. ifsession is loaded - here's the output of a common reload of the service:
What am I missing here?