diff options
Diffstat (limited to 'txrban.txr')
-rw-r--r-- | txrban.txr | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,6 @@ @(include "config") @(include "utils") +@(bind iptables "iptables") @(do (defstruct client-info nil (ip nil) @@ -55,7 +56,7 @@ (cond ((not cli.banned) (unless *dry-run* - (sh `@{*off*}iptables -I INPUT 1 -s @{cli.ip} -i @{*iface*} -j DROP`)) + (sh `@{*off*}@iptables -I INPUT 1 -s @{cli.ip} -i @{*iface*} -j DROP`)) (debug "banned ~a for ~a starting on ~a\n" cli.ip (hrtime howlong) (time-string-local time "%c")) (set cli.banned (rcons time new-until))) @@ -89,7 +90,7 @@ (defun unban (cli) (unless *dry-run* - (sh `@{*off*}iptables -D INPUT -s @{cli.ip} -i @{*iface*} -j DROP`)) + (sh `@{*off*}@iptables -D INPUT -s @{cli.ip} -i @{*iface*} -j DROP`)) (debug "unbanned ~a\n" cli.ip) (set cli.banned nil)) |