Use the --ipblock="ip route" or --ipblock=iptables options to enable null routing or packet filtering blocking.
Example command to use in hosts.allow:
sshd, proftpd, vsftpd: ALL: spawn /usr/bin/blockhosts.py --ipblock="ip route" \
--logfiles="/var/log/secure,/var/log/vsftpd.log" \
--echo "%c-%s" --mail --check-ip "%h" & \
: allow
Use --ipblock="ip route" if the ip route command null routing is desired.
Use --ipblock=iptables if iptables packet level filtering is desired.
Root permission for the run of blockhosts.py script is needed, since only root can change routing tables or install iptables rules. This works properly with correct permissions, if using hosts.access/hosts.deny to run this script.
Full path for the "ip" and "iptables" can also be provided in the --ipblock option if these are not in PATH, for example: --ipblock="/sbin/ip route" or --ipblock=/sbin/iptables.
Recent comments
1 week 1 day ago
2 weeks 1 day ago
2 weeks 1 day ago
2 weeks 6 days ago
7 weeks 1 day ago
9 weeks 19 hours ago
12 weeks 2 days ago
16 weeks 3 days ago
17 weeks 1 day ago
19 weeks 3 days ago