Hi,
I configured sshguard on SUSE LEAP 15 as per the instructions found here
https://en.opensuse.org/SDB:Install_and_configure_sshguard
. It fails to start at the boot time and later when I try to start it with systemctl.
I get these errors -
# systemctl status sshguard● sshguard.service - SSHGUARD provides automatic attack blocking
Loaded: loaded (/usr/lib/systemd/system/sshguard.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2018-10-15 07:53:50 IST; 2min 51s ago
Process: 1361 ExecStopPost=/usr/sbin/iptables -F sshguard (code=exited, status=4)
Process: 1358 ExecStartPre=/usr/sbin/iptables -N sshguard (code=exited, status=4)
Oct 15 07:53:50 linux-e9ip systemd[1]: sshguard.service: Unit entered failed state.
Oct 15 07:53:50 linux-e9ip systemd[1]: sshguard.service: Failed with result 'exit-code'.
Oct 15 07:53:50 linux-e9ip systemd[1]: sshguard.service: Service hold-off time over, scheduling restart.
Oct 15 07:53:50 linux-e9ip systemd[1]: Stopped SSHGUARD provides automatic attack blocking.
Oct 15 07:53:50 linux-e9ip systemd[1]: sshguard.service: Start request repeated too quickly.
Oct 15 07:53:50 linux-e9ip systemd[1]: Failed to start SSHGUARD provides automatic attack blocking.
Oct 15 07:53:50 linux-e9ip systemd[1]: sshguard.service: Unit entered failed state.
Oct 15 07:53:50 linux-e9ip systemd[1]: sshguard.service: Failed with result 'exit-code'.
# systemctl start sshguard
# systemctl status sshguard
● sshguard.service - SSHGUARD provides automatic attack blocking
Loaded: loaded (/usr/lib/systemd/system/sshguard.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2018-10-15 07:57:01 IST; 1s ago
Process: 2727 ExecStopPost=/usr/sbin/ip6tables -X sshguard (code=exited, status=0/SUCCESS)
Process: 2726 ExecStopPost=/usr/sbin/iptables -X sshguard (code=exited, status=0/SUCCESS)
Process: 2725 ExecStopPost=/usr/sbin/ip6tables -D INPUT -p tcp --dport $PORTS -j sshguard (code=exited, status=0/SUCCESS)
Process: 2724 ExecStopPost=/usr/sbin/iptables -D INPUT -p tcp --dport $PORTS -j sshguard (code=exited, status=0/SUCCESS)
Process: 2723 ExecStopPost=/usr/sbin/ip6tables -F sshguard (code=exited, status=0/SUCCESS)
Process: 2722 ExecStopPost=/usr/sbin/iptables -F sshguard (code=exited, status=0/SUCCESS)
Process: 2721 ExecStart=/usr/sbin/sshguard -a $ATTACK_TRESHOLD -p $RELEASE_TIMEOUT -s $FORGET_TIMEOUT -w $WHITELIST -b $BLACKLIST -l $MONITORED_LOGS (code=exited, status=64)
Process: 2720 ExecStartPre=/usr/sbin/ip6tables -I INPUT 1 -p tcp --dport $PORTS -j sshguard (code=exited, status=0/SUCCESS)
Process: 2719 ExecStartPre=/usr/sbin/iptables -I INPUT 1 -p tcp --dport $PORTS -j sshguard (code=exited, status=0/SUCCESS)
Process: 2718 ExecStartPre=/usr/sbin/ip6tables -N sshguard (code=exited, status=0/SUCCESS)
Process: 2717 ExecStartPre=/usr/sbin/iptables -N sshguard (code=exited, status=0/SUCCESS)
Main PID: 2721 (code=exited, status=64)
Oct 15 07:57:01 linux-e9ip systemd[1]: sshguard.service: Unit entered failed state.
Oct 15 07:57:01 linux-e9ip systemd[1]: sshguard.service: Failed with result 'exit-code'.
Oct 15 07:57:01 linux-e9ip systemd[1]: sshguard.service: Service hold-off time over, scheduling restart.
Oct 15 07:57:01 linux-e9ip systemd[1]: Stopped SSHGUARD provides automatic attack blocking.
Oct 15 07:57:01 linux-e9ip systemd[1]: sshguard.service: Start request repeated too quickly.
Oct 15 07:57:01 linux-e9ip systemd[1]: Failed to start SSHGUARD provides automatic attack blocking.
Oct 15 07:57:01 linux-e9ip systemd[1]: sshguard.service: Unit entered failed state.
Oct 15 07:57:01 linux-e9ip systemd[1]: sshguard.service: Failed with result 'exit-code'.
# journalctl -xe | grep sshguard
Oct 15 07:56:39 linux-e9ip systemd[1]: is_symlink_with_known_name(sshguard.service, sshguard.service) → 1
Oct 15 07:56:41 linux-e9ip systemd[1]: is_symlink_with_known_name(sshguard.service, sshguard.service) → 1
-- Subject: Unit sshguard.service has begun start-up
-- Unit sshguard.service has begun starting up.
-- Subject: Unit sshguard.service has finished start-up
-- Unit sshguard.service has finished starting up.
Oct 15 07:57:00 linux-e9ip sshguard[2676]: whitelist: unable to open input file /etc/sshguard/whitelist: Permission denied
Oct 15 07:57:00 linux-e9ip sshguard[2676]: Could not handle whitelisting for /etc/sshguard/whitelist.
Oct 15 07:57:00 linux-e9ip sshguard[2676]: usage: sshguard -v] -a thresh] -b thresh:file]
Oct 15 07:57:00 linux-e9ip sshguard[2676]: -f service:pid-file] -i pidfile] -l source] -p interval]
Oct 15 07:57:00 linux-e9ip sshguard[2676]: -s interval] -w address | file]
Oct 15 07:57:00 linux-e9ip systemd[1]: sshguard.service: Main process exited, code=exited, status=64/n/a
Oct 15 07:57:00 linux-e9ip systemd[1]: sshguard.service: Unit entered failed state.
Oct 15 07:57:00 linux-e9ip systemd[1]: sshguard.service: Failed with result 'exit-code'.
Oct 15 07:57:00 linux-e9ip systemd[1]: sshguard.service: Service hold-off time over, scheduling restart.
-- Subject: Unit sshguard.service has finished shutting down
-- Unit sshguard.service has finished shutting down.
-- Subject: Unit sshguard.service has begun start-up
-- Unit sshguard.service has begun starting up.
-- Subject: Unit sshguard.service has finished start-up
-- Unit sshguard.service has finished starting up.
Oct 15 07:57:00 linux-e9ip sshguard[2688]: whitelist: unable to open input file /etc/sshguard/whitelist: Permission denied
Oct 15 07:57:00 linux-e9ip sshguard[2688]: Could not handle whitelisting for /etc/sshguard/whitelist.
Oct 15 07:57:00 linux-e9ip sshguard[2688]: usage: sshguard -v] -a thresh] -b thresh:file]
Oct 15 07:57:00 linux-e9ip sshguard[2688]: -f service:pid-file] -i pidfile] -l source] -p interval]
Oct 15 07:57:00 linux-e9ip sshguard[2688]: -s interval] -w address | file]
Oct 15 07:57:00 linux-e9ip systemd[1]: sshguard.service: Main process exited, code=exited, status=64/n/a
Oct 15 07:57:00 linux-e9ip systemd[1]: sshguard.service: Unit entered failed state.
Oct 15 07:57:00 linux-e9ip systemd[1]: sshguard.service: Failed with result 'exit-code'.
Oct 15 07:57:00 linux-e9ip systemd[1]: sshguard.service: Service hold-off time over, scheduling restart.
-- Subject: Unit sshguard.service has finished shutting down
-- Unit sshguard.service has finished shutting down.
-- Subject: Unit sshguard.service has begun start-up
-- Unit sshguard.service has begun starting up.
-- Subject: Unit sshguard.service has finished start-up
-- Unit sshguard.service has finished starting up.
Oct 15 07:57:00 linux-e9ip sshguard[2699]: whitelist: unable to open input file /etc/sshguard/whitelist: Permission denied
Oct 15 07:57:00 linux-e9ip sshguard[2699]: Could not handle whitelisting for /etc/sshguard/whitelist.
Oct 15 07:57:00 linux-e9ip sshguard[2699]: usage: sshguard -v] -a thresh] -b thresh:file]
Oct 15 07:57:00 linux-e9ip sshguard[2699]: -f service:pid-file] -i pidfile] -l source] -p interval]
Oct 15 07:57:00 linux-e9ip sshguard[2699]: -s interval] -w address | file]
Oct 15 07:57:00 linux-e9ip systemd[1]: sshguard.service: Main process exited, code=exited, status=64/n/a
Oct 15 07:57:00 linux-e9ip systemd[1]: sshguard.service: Unit entered failed state.
Oct 15 07:57:00 linux-e9ip systemd[1]: sshguard.service: Failed with result 'exit-code'.
Oct 15 07:57:01 linux-e9ip systemd[1]: sshguard.service: Service hold-off time over, scheduling restart.
-- Subject: Unit sshguard.service has finished shutting down
-- Unit sshguard.service has finished shutting down.
-- Subject: Unit sshguard.service has begun start-up
-- Unit sshguard.service has begun starting up.
-- Subject: Unit sshguard.service has finished start-up
-- Unit sshguard.service has finished starting up.
Oct 15 07:57:01 linux-e9ip sshguard[2710]: whitelist: unable to open input file /etc/sshguard/whitelist: Permission denied
Oct 15 07:57:01 linux-e9ip sshguard[2710]: Could not handle whitelisting for /etc/sshguard/whitelist.
Oct 15 07:57:01 linux-e9ip sshguard[2710]: usage: sshguard -v] -a thresh] -b thresh:file]
Oct 15 07:57:01 linux-e9ip sshguard[2710]: -f service:pid-file] -i pidfile] -l source] -p interval]
Oct 15 07:57:01 linux-e9ip sshguard[2710]: -s interval] -w address | file]
Oct 15 07:57:01 linux-e9ip systemd[1]: sshguard.service: Main process exited, code=exited, status=64/n/a
Oct 15 07:57:01 linux-e9ip systemd[1]: sshguard.service: Unit entered failed state.
Oct 15 07:57:01 linux-e9ip systemd[1]: sshguard.service: Failed with result 'exit-code'.
Oct 15 07:57:01 linux-e9ip systemd[1]: sshguard.service: Service hold-off time over, scheduling restart.
-- Subject: Unit sshguard.service has finished shutting down
-- Unit sshguard.service has finished shutting down.
-- Subject: Unit sshguard.service has begun start-up
-- Unit sshguard.service has begun starting up.
-- Subject: Unit sshguard.service has finished start-up
-- Unit sshguard.service has finished starting up.
Oct 15 07:57:01 linux-e9ip sshguard[2721]: whitelist: unable to open input file /etc/sshguard/whitelist: Permission denied
Oct 15 07:57:01 linux-e9ip sshguard[2721]: Could not handle whitelisting for /etc/sshguard/whitelist.
Oct 15 07:57:01 linux-e9ip sshguard[2721]: usage: sshguard -v] -a thresh] -b thresh:file]
Oct 15 07:57:01 linux-e9ip sshguard[2721]: -f service:pid-file] -i pidfile] -l source] -p interval]
Oct 15 07:57:01 linux-e9ip sshguard[2721]: -s interval] -w address | file]
Oct 15 07:57:01 linux-e9ip systemd[1]: sshguard.service: Main process exited, code=exited, status=64/n/a
Oct 15 07:57:01 linux-e9ip systemd[1]: sshguard.service: Unit entered failed state.
Oct 15 07:57:01 linux-e9ip systemd[1]: sshguard.service: Failed with result 'exit-code'.
Oct 15 07:57:01 linux-e9ip systemd[1]: sshguard.service: Service hold-off time over, scheduling restart.
-- Subject: Unit sshguard.service has finished shutting down
-- Unit sshguard.service has finished shutting down.
Oct 15 07:57:01 linux-e9ip systemd[1]: sshguard.service: Start request repeated too quickly.
-- Subject: Unit sshguard.service has failed
-- Unit sshguard.service has failed.
Oct 15 07:57:01 linux-e9ip systemd[1]: sshguard.service: Unit entered failed state.
Oct 15 07:57:01 linux-e9ip systemd[1]: sshguard.service: Failed with result 'exit-code'.
Please let me know what I should do for fixing that.