Jump to content
  • Create New...

How to install SSHGuard in FreeBSD

Recommended Posts

  • Premium

Hello, in order to protect our machine against Brute Force attacks, we will use the sshguard.

I will be quick:

cd /usr/ports /security/sshguard -pf
make install clean ; rehash

The sshguard works by reading the log files.Will also protect our server form:

sendmail, exim, dovecot, cucipop, UWimap bruteforce attacks
proftpd, vsftpd, pure-ftpd, FreeBSD ftpd bruteforce attacks

To configure sshguard, edit the file in "/etc/pf.conf" and add the following lines:

table <sshguard> persist
block in quick on $ext_if proto tcp from <sshguard> to any port 22 label "SSH bruteforce atempt"

After, edit the file "/etc/syslog.conf" and add the following line:

auth.info;authpriv.info |exec /usr/local/sbin/sshguard

Now restart the syslog service:

/etc/rc.d/syslogd restart

To check if the IP of the attacker is added to the table sshguard viewing PF Firewall:

pfctl -Tshow -tsshguard

SSHGuard project:

  • Love 7
Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...
  • 1 month later...
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Activity

    1. 36

      Destroy Item System

    2. 1


    3. 0

      Fusion.org is Looking for Staff Members

    4. 1


    5. 3


    6. 4

      Spider Queen not spawining in spider dungeon v1

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.