13 lines
315 B
Bash
13 lines
315 B
Bash
#!/usr/bin/env bash
|
|
|
|
echo "Applying iptables rules for sshguard";
|
|
|
|
# IPv4
|
|
iptables -N sshguard;
|
|
iptables -A INPUT -m multiport -p tcp --destination-ports 22,2222 -j sshguard;
|
|
|
|
# IPv6
|
|
ip6tables -N sshguard;
|
|
ip6tables -A INPUT -m multiport -p tcp --destination-ports 22,2222 -j sshguard;
|
|
|
|
systemctl restart sshguard;
|