I tried using sshguard with Pure-FTPd, and it didn't work as well.
blurr-ink# fetch https://sourceforge.net/projects/sshguard/files/sshguard/sshguard-1.4/sshguard-1.4.tar.bz2
sshguard-1.4.tar.bz2 100% of 55 kB 13 kBps
===> Compressing manual pages for bzip2-1.0.5
===> Running ldconfig
/sbin/ldconfig -m /usr/local/lib
===> Registering installation for bzip2-1.0.5
===> Cleaning for bzip2-1.0.5
blurr-ink# rehash
blurr-ink# tar yxf sshguard-1.4.tar.bz2
tar: Unrecognized archive format: Inappropriate file type or format
tar: Error exit delayed from previous errors.
Code:blurr-ink# tar yxf sshguard-1.4.tar.bz2 tar: Unrecognized archive format: Inappropriate file type or format tar: Error exit delayed from previous errors.
What am I doing wrong? And I am in the proper directory that I downloaded it to.
$ tar -yxf sshguard-1.4.tar.bz2
DutchDaemon said:No, 'y' is for bz2, 'z' is for gzip.
gong:/h/tl# tar cf z.tar tmp
gong:/h/tl# bzip2 z.tar
gong:/h/tl# tar -tvzf z.tar.bz2
drwxr-xr-x 0 tl tl 0 Nov 6 08:51 tmp/
-rwxr-xr-x 0 tl tl 1402400 Nov 5 20:30 tmp/filer02.091004
-rwxr-xr-x 0 tl tl 2189 Nov 5 20:30 tmp/ops_dp.pl
-rwxr-xr-x 0 tl tl 1633905 Nov 5 20:30 tmp/filer02.091011
-rwxr-xr-x 0 tl tl 5430 Nov 6 00:15 tmp/stat_dp.pl
-rwxr-xr-x 0 tl tl 501267 Nov 5 20:30 tmp/dataf02.txt
-rwxr-xr-x 0 tl tl 3041058 Nov 5 20:30 tmp/ASUPGrab.zip
gong:/h/tl#
-y (c mode only) Compress the resulting archive with bzip2(1). In
extract or list modes, this option is ignored. Note that, unlike
other tar implementations, this implementation recognizes bzip2
compression automatically when reading archives.
-z (c mode only) Compress the resulting archive with gzip(1). In
extract or list modes, this option is ignored. Note that, unlike
other tar implementations, this implementation recognizes gzip
compression automatically when reading archives.
[X] The "/sshguard/sshguard-1.4/sshguard-1.4.tar.bz2" file could not be found or is not available. Please select another file.
$ fetch https://sourceforge.net/projects/sshguard/files/sshguard/sshguard-1.4/sshguard-1.4.tar.bz2
fetch: https://sourceforge.net/projects/sshguard/files/sshguard/sshguard-1.4/sshguard-1.4.tar.bz2: Unknown error: 0
fetch https://sourceforge.net/projects/sshguard/files/sshguard/sshguard-1.4/sshguard-1.4.tar.bz2/download
download 100% of 148 kB 124 kBps
blurr-ink# tar -yxf download
blurr-ink# ls
download sshguard-1.4
blurr-ink# cd sshguard-1.4
blurr-ink# ls
Changes aclocal.m4 depcomp missing stamp-h1
Makefile.am config.h.in examples mkinstalldirs ylwrap
Makefile.in configure install-sh scripts
README configure.ac man src
blurr-ink#
#cd /usr/ports/security/sshguard-pf && make deinstall
./configure --with-firewall=pf
blurr-ink# make
Making all in src
make all-recursive
Making all in parser
make all-am
Making all in fwalls
gcc -DHAVE_CONFIG_H -I. -I../../src -I. -I.. -Wall -std=c99 -D_POSIX_C_SOURCE=
200112L -g -O2 -MT command.o -MD -MP -MF .deps/command.Tpo -c -o command.o command.c
mv -f .deps/command.Tpo .deps/command.Po
rm -f libfwall.a
ar cru libfwall.a command.o
ranlib libfwall.a
gcc -DHAVE_CONFIG_H -I. -I. -std=c99 -Wall -D_POSIX_C_SOURCE=200112L -g -O2 -MT
sshguard_options.o -MD -MP -MF .deps/sshguard_options.Tpo -c -o
sshguard_options.o sshguard_options.c
mv -f .deps/sshguard_options.Tpo .deps/sshguard_options.Po
gcc -I. -std=c99 -Wall -D_POSIX_C_SOURCE=200112L -g -O2 -o sshguard sshguard.o
sshguard_whitelist.o sshguard_log.o sshguard_procauth.o
sshguard_blacklist.o sshguard_options.o simclist.o parser/libparser.a fwalls/libfwall.a -lpthread
Making all in man
blurr-ink# make install
Making install in src
Making install in parser
make install-am
Making install in fwalls
test -z "/usr/local/sbin" || .././install-sh -c -d "/usr/local/sbin"
/usr/bin/install -c 'sshguard' '/usr/local/sbin/sshguard'
Making install in man
test -z "/usr/local/share/man/man8" || .././install-sh -c -d "/usr/local/share/man/man8"
/usr/bin/install -c -m 644 'sshguard.8' '/usr/local/share/man/man8/sshguard.8'
blurr-ink#
blurr-ink#
blurr-ink# rehash
blurr-ink# pkg_info|grep sshguard
blurr-ink#
blurr-ink# /usr/local/sbin/sshguard -v
sshguard 1.4.4
Copyright (c) 2007,2008 Mij <mij@*beep**beep**beep**beep**beep*x.it>
This is free software; see the source for conditions on copying.
blurr-ink#
# New ports collection makefile for: sshguard-pf
# Date created: 17 May 2007
# Whom: Mij <mij@*beep**beep**beep**beep**beep*x.it>
#
# $FreeBSD: ports/security/sshguard-pf/Makefile,v 1.4 2008/07/26 14:01:10 lwhsu Exp $
#
PKGNAMESUFFIX= -pf
COMMENT= Protect hosts from brute force attacks against ssh and other services using pf
CONFLICTS= sshguard-1.* sshguard-ipfilter-1.* sshguard-ipfw-1.*
SSHGUARDFW= pf
MASTERDIR= ${.CURDIR}/../sshguard
.include "${MASTERDIR}/Makefile"
Nov 20 14:00:24 blurr-ink webmin[943]: Webmin starting
Nov 20 14:00:24 blurr-ink sshguard[944]: authenticating service 310 with process ID from /var/run/proftpd.pid
Nov 20 14:00:24 blurr-ink sshguard[944]: unable to open pidfile '/var/run/sshd.pid': No such file or directory.
Nov 20 14:00:24 blurr-ink sshguard[944]: authenticating service 100 with process ID from /var/run/sshd.pid
Nov 20 14:00:24 blurr-ink sshguard[944]: unable to open pidfile '/var/run/dovecot/master.pid': No such file or directory.
Nov 20 14:00:24 blurr-ink sshguard[944]: authenticating service 210 with process ID from /var/run/dovecot/master.pid
Nov 20 14:00:24 blurr-ink sshguard[944]: Started successfully [(a,p,s)=(5, 420, 1200)], now ready to scan.
Nov 20 14:12:09 blurr-ink proftpd[1382]: localhost (dyn216-8-133-228.ADSL.mnsi.net[216.8.133.228]) - USER lego (Login failed): Incorrect password.
Nov 20 14:12:09 blurr-ink proftpd[1382]: localhost (dyn216-8-133-228.ADSL.mnsi.net[216.8.133.228]) - FTP session closed.
Nov 20 14:12:24 blurr-ink proftpd[1385]: localhost (dyn216-8-133-228.ADSL.mnsi.net[216.8.133.228]) - USER lego (Login failed): Incorrect password.
Nov 20 14:12:24 blurr-ink proftpd[1385]: localhost (dyn216-8-133-228.ADSL.mnsi.net[216.8.133.228]) - FTP session closed.
Nov 20 14:12:40 blurr-ink proftpd[1386]: localhost (dyn216-8-133-228.ADSL.mnsi.net[216.8.133.228]) - USER lego (Login failed): Incorrect password.
Nov 20 14:12:40 blurr-ink proftpd[1386]: localhost (dyn216-8-133-228.ADSL.mnsi.net[216.8.133.228]) - FTP session closed.
Nov 20 14:13:19 blurr-ink proftpd[1455]: localhost (dyn216-8-133-228.ADSL.mnsi.net[216.8.133.228]) - USER lego (Login failed): Incorrect password.
Nov 20 14:13:19 blurr-ink proftpd[1455]: localhost (dyn216-8-133-228.ADSL.mnsi.net[216.8.133.228]) - FTP session closed.
Nov 20 14:13:34 blurr-ink proftpd[1456]: localhost (dyn216-8-133-228.ADSL.mnsi.net[216.8.133.228]) - USER lego (Login failed): Incorrect password.
Nov 20 14:13:34 blurr-ink proftpd[1456]: localhost (dyn216-8-133-228.ADSL.mnsi.net[216.8.133.228]) - FTP session closed.
Nov 20 14:13:50 blurr-ink proftpd[1457]: localhost (dyn216-8-133-228.ADSL.mnsi.net[216.8.133.228]) - USER lego (Login failed): Incorrect password.
Nov 20 14:13:50 blurr-ink proftpd[1457]: localhost (dyn216-8-133-228.ADSL.mnsi.net[216.8.133.228]) - FTP session closed.
Nov 20 14:14:06 blurr-ink proftpd[1460]: localhost (dyn216-8-133-228.ADSL.mnsi.net[216.8.133.228]) - USER lego (Login failed): Incorrect password.
Nov 20 14:14:06 blurr-ink proftpd[1460]: localhost (dyn216-8-133-228.ADSL.mnsi.net[216.8.133.228]) - FTP session closed.
Nov 20 14:14:30 blurr-ink proftpd[1464]: localhost (dyn216-8-133-228.ADSL.mnsi.net[216.8.133.228]) - USER lego: Login successful.
Nov 20 18:49:25 blurr-ink sshguard[2356]: Got exit signal, flushing blocked addresses and exiting...
Nov 20 18:49:25 blurr-ink sshguard[6911]: authenticating service 310 with process ID from /var/run/proftpd.pid
Nov 20 18:49:25 blurr-ink sshguard[6911]: authenticating service 100 with process ID from /var/run/sshd.pid
Nov 20 18:49:25 blurr-ink sshguard[6911]: unable to open pidfile '/var/run/dovecot/master.pid': No such file or directory.
Nov 20 18:49:25 blurr-ink sshguard[6911]: authenticating service 210 with process ID from /var/run/dovecot/master.pid
Nov 20 18:49:25 blurr-ink sshguard[6911]: Started successfully [(a,p,s)=(4, 420, 1200)], now ready to scan.
blurr-ink# tail /var/run/sshd.pid
1094
blurr-ink# tail /var/run/proftpd.pid
932
blurr-ink# tail /var/run/sshd.pid
1094
blurr-ink# tail /var/run/dovecot/master.pid
tail: /var/run/dovecot/master.pid: No such file or directory
blurr-ink# cd /var/run/ && ls
ConsoleKit httpd.pid saslauthd
PolicyKit inetd.pid sendmail.pid
accept.lock.1082 ld-elf.so.hints spamass-milter.sock
clamav ld.so.hints spamd
cron.pid log sshd.pid
dbus logpriv syslog.pid
devd.pid named syslogd.sockets
devd.pipe ppp utmp
dmesg.boot proftpd xauth
hald proftpd.pid xdmctl
# pkg_delete dovecot\*
, and then install the port again. I guess sshguard still works because it will take the logging from Dovecot 'on face value' instead of checking it against a pid file.I have mailed sshguard's maintainers to get that servicecode page back online a.s.a.p. It will likely contain the answer.
P.S. that email bounced, because the email address is not valid ..