Forum Discussion
Jose_Santiago_O
Nimbostratus
May 15, 2008Prevent ftp brute force attack using irules.
Hi,
Does anyone know how to prevent ftp brute force attacks using irules? I have an ftp server and everyday i see a lot of connections comming from different countries trying to get access to my ftp server using dictionaries. My ftp is not anonymous,by the way, and i have to block certain ips after a large number of attempts.
With HTTP is easy, if you hit my virtual server and you are not going to www.mysite.com I reject the connection, but is that possible with ftp? i.e., if you try to connect to my virtual server and not going to ftp.mysite.com reject the connection.
I hope someone could bring some ideas.
Thanks.
Jose Santiago Oyervides.
- Colin_Walker_12Historic F5 AccountThere are a few different approaches you could try, but the one you outlined above is probably the simplest. Since there is no host header readily available via TMM's inpsection engine, when dealing with an FTP connection, you'll need to use the TCP::collect and TCP::payload commands to collect and inspect the payload data, but you should be able to accomplish basically the same thing as you would with HTTP connections.
- Jose_Santiago_O
Nimbostratus
Hi,when CLIENT_ACCEPTED { TCP::collect TCP::release } when CLIENT_DATA { log local0. "payload: [TCP::payload]" set client_data [string tolower [string trim [TCP::payload]]] if { $client_data contains "mycompany" } { pool pool_ftp } else { log local0. "Rejected" reject } TCP::release }}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects