Chat with us, powered by LiveChat
How to Restrict Number of Connections for the brute force with Pf ?

How to Restrict Number of Connections for the brute force with Pf ?

SSH Tools is a favorite target of hackers, so you should take some security measures. One of them – to restrict the number of connections to avoid the DoS-attacks and brute force.

# vi /etc/pf.conf
table <sshbf> persist
block in log quick on $ ext_if inet from <sshbf>
pass in log on $ ext_if inet proto tcp to $ ext_if port ssh keep state \
(Max-src-conn-rate 5/60, overload <sshbf> flush global)

This rule set instructs the packet filter to prevent more than 5 concurrent connections to port 22 for 60 seconds.

Mac Wilson

Mac Wilson is a technology writer and a Sales and Marketing Executive at eUKhost Ltd. He loves to write about latest technologies and trends just like cloud computing which are changing the way people do business.

To know more about our services and solutions, kindly visit eUKhost's Official Website.

Latest posts by Mac Wilson (see all)

Sharing

Leave your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.