aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar alecdwm 2016-04-09 11:53:57 +0200
committerGravatar alecdwm 2016-04-09 11:53:57 +0200
commit48b968d27e761aca07038f9ddefb51db0a271d00 (patch)
tree58922bacb95f92ed62bc3ead6aa05bd12b7b1476
parent2a57f18b63184956ef3521c46804b8dbcee0bc93 (diff)
fixed iptablesdrop mode, again
-rw-r--r--rsham.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/rsham.go b/rsham.go
index 81bc50b..fefdcca 100644
--- a/rsham.go
+++ b/rsham.go
@@ -90,7 +90,7 @@ func sshHandleConnection(mode string, nConn net.Conn, config *ssh.ServerConfig)
ip := nConn.RemoteAddr().String()[:strings.LastIndex(nConn.RemoteAddr().String(), ":")]
sshLog.Info("adding drop rule to iptables for ip", "ip", ip)
- cmd := exec.Command("iptables", "-I", "INPUT", "-s", "ip", "-j", "DROP")
+ cmd := exec.Command("iptables", "-I", "INPUT", "-s", ip, "-j", "DROP")
out, err := cmd.CombinedOutput()
if err != nil {
sshLog.Error("error blocking IP", "ip", ip, "error", err, "command output", out)