BSD Ports

security/bruteblock 0.8.0 FreeBSD

Software for blocking bruteforce attacks with ipfw

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
Last update
Commit
a0c862463c
License
BSD3CLAUSE
Categories
security
Package size
34.3 KiB, 92.9 KiB installed

Description

Bruteblock allows system administrators to block various bruteforce attacks on UNIX services. The program analyzes system logs and adds attacker's IP address into ipfw2 table effectively blocking them. Addresses are automatically removed from the table after specified amount of time. Bruteblock uses regular expressions to parse logs, which provides flexibility allowing it to be used with almost any network service. Bruteblock is written in pure C, doesn't use any external programs and work with ipfw2 tables via raw sockets API.

Install

Binary package:

pkg install bruteblock

From the ports tree:

cd /usr/ports/security/bruteblock/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	bruteblock>0:security/bruteblock

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest0.8.00.8.00.0.5_100.0.60.8.0
FreeBSD:14:quarterly0.1.10.1.1n/a0.0.60.1.1
FreeBSD:15:latest0.8.00.8.0n/a--
FreeBSD:15:quarterly0.1.10.1.1n/an/an/a
FreeBSD:16:latest0.1.10.8.0n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

As this port's Makefile names them.

Library 1

The full lists below include those, and their dependencies in turn.

Build dependencies 1
Run dependencies 1

No port depends on this one.

Configuration

Options name: security_bruteblock

OptionDefaultDescription
DOCSoffBuild and/or install documentation
Service scripts
bruteblockd

Message after installing

Configuration of the bruteblock is done via configuration files
located at /usr/local/etc/bruteblock.

To run the script, append following lines to /etc/syslog.conf:

    !*
    auth.info;authpriv.info    |exec /usr/local/sbin/bruteblock -f /usr/local/etc/bruteblock/ssh.conf

and restart syslogd.

Also you should add ipfw2 table and the corresponding deny rule.
For example,

    ipfw add deny ip from table(1) to any

Next, you'll want to setup periodical cleanup of ipfw2 table.
Add following lines to /etc/rc.conf:

    bruteblockd_enable="YES"
    bruteblockd_table="1"
    bruteblockd_flags="-s 5"

and start bruteblockd:

    service bruteblockd start

See bruteblock(8) for more details.

Files

Manual pages 1
  • bruteblock(8)
pkg-plist 5
  • sbin/bruteblock
  • sbin/bruteblockd
  • @sample etc/bruteblock/proftpd.conf.sample
  • @sample etc/bruteblock/ssh.conf.sample
  • share/man/man8/bruteblock.8.gz
distinfo 1
FileSizeSHA256
samm-git-bruteblock-v0.8.0_GH0.tar.gz41824a0e26560e3fd406c19f6867a61f5504fbb929be1d568869f8668858ff909408b

Commit history 3

DateCommitCreditsLog message
a0c862463c Oleksii Samorukov security/bruteblock: correct homepage url
db05d37c97 Oleksii Samorukov security/bruteblock: upgrade to 0.0.8 (bugfix release)
545cc989ff Oleksii Samorukov security/bruteblock: upgrade to 0.0.7 (added IPv6)