[Proftpd-user] ProFTPD 1.3.7a : Various BanOnEvent ClientConnectRate rules in server config section
"De Gaaij, Pieter" <[email protected]> Wed, 16 Jun 2021 18:35:44 +0200
| Newsgroups | gmane.network.proftpd.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, I have a ProFTPD daemon running with version 1.3.7a And in the server-config section, I have specified, that if the client-IP belongs to a specific Class, banning is turned on for lets say BanOnEvent ClientConnectRate. Otherwise, the BanEngine is turned off. Question: could it be made possible to configure different BanOnEvent ClientConnectRate rules for different Classes ? Lets say: <Class manyconnects> From xxx.yyyy.zzzz.cccc </Class> <Class lessconnects> From xxx.yyyy.zzzz.cccc </Class> <IfModule mod_ban.c> BanEngine on BanLog <basedir>/log/proftpd_ban.log BanTable <basedir>/etc/proftpd_ban.tab # Allow the FTP admin to manually add/remove bans BanControlsACLs all allow user root,proftpd # If the same client reaches the MaxLoginAttempts limit 10 times # within 1 minutes, automatically add a ban for that client that # will expire after two hours. # BanOnEvent MaxLoginAttempts 2/00:05:00 01:00:00 "You are banned out for 1 hour" BanOnEvent RootLogin 1/00:01:00 02:00:00 "Stop connecting with root" BanOnEvent mod_auth.root-login 1/00:01:00 02:00:00 "Stop connecting with root" BanOptions MatchAnyServer # # Define that a banned client host in one VirtualHost is also banned in the other VirtualHost. # BanOptions MatchAnyServer <IfClass lessconnects> # Turn the mod_ban module off for whitelisted clients BanOnEvent ClientConnectRate 5/00:01:00 02:00:00 "Stop connecting frequently" </IfClass> <IfClass manyconnects> # Make sure the mod_ban module is on for clients that are not whitelisted BanOnEvent ClientConnectRate 50/00:01:00 02:00:00 "Stop connecting frequently" </IfClass> </IfModule> I think, now only the first rule is configured. I hopy someone could have a remark on it. Thanks in advance, With regards, Pieter de Gaaij _______________________________________________ ProFTPD Users List <[email protected]> Unsubscribe problems? http://www.proftpd.org/list-unsub.html