OSはFreeBSD 5.4Rを前提とします。
swatch_enable="YES" swatch_rules="1" swatch_1_flags="--tail-file=/var/log/auth.log --awk-field-syntax --config-file=/usr/local/etc/swatchrc -r 00:01 --daemon" swatch_1_user="root" swatch_1_pidfile="/var/run/swatch1.pid" firewall_enable="YES" firewall_quiet="YES" firewall_logging="YES" firewall_script="/etc/rc.firewall" firewall_type="OPEN"実質的には
swatch --tail-file=/var/log/auth.log --awk-field-syntax --config-file=/usr/local/etc/swatchrc -r 00:01 --daemonというコマンドを起動時に立ち上げることになります。
watchfor /Failed password for root from/
exec /sbin/ipfw add 1 deny all from $11:255.255.255.255 to any
mail=root,subject=Failed_password_for_root_from
#
watchfor /Illegal user/
exec /sbin/ipfw add 1 deny all from $10:255.255.255.255 to any
mail=root,subject=Illegal_user
mailで始まる行は、動作が確認できたら消してもいいでしょう。