Re: [Proftpd-user] Mod_ban.c : does it work with IfC lass and with serveral VirtualHosts ?
"TJ Saunders" <[email protected]>
| Newsgroups | gmane.network.proftpd.user |
|---|---|
| Message-ID | <[email protected]> |
> 1) SFTP/SCP file transfers from 192.168.101.165 are still banned when
> executed more than 10 times a minute. So it seems that the BanEngine is
> always on.
>
> 2) Even SFTP/SCP sessions initiated on the dropserver itself
> (10.65.140.15: so not whitelisted) are banned when the frequency is
> higher than 10 times/min.`
>
> 3) And it seems that the FTP-sessions are not banned at all: when the
> SFTP-connection from ```10.65.140.15 is banned, I am still able to
> connect to the FTP-virtual host.``
>
> Questions:
>
> 1) did I have mis-configured the BAN-module and the IfSession modules
> with the IfClass directives ?
No.
However, you have made a common assumption/misconfiguration -- most configuration directives that are *not* within a <VirtualHost> or <Global> section are not *global*. This means that they do not automatically apply to <VirtualHost> sections.
Since your mod_ban configuration is not in a <Global> section, it will not apply to your separate <VirtualHost> sections. To remedy this, try:
<IfModule mod_ban.c>
# Make sure these ban configurations apply to all <VirtualHost> sections
<Global>
# Add your <IfClass> and other ban directives here
</Global>
</IfModule>
> 2) Am I wrong asumming that the same BAN-module should function for
> the SFTP *and* FTP Virtual Hosts ?
It should function, yes, as long as you use <Global> sections.
Hope this helps,
TJ
_______________________________________________
ProFTPD Users List <[email protected]>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html