Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- iptables -N SSH-ALL
- iptables -N SSH-BLOCKED
- iptables -A input_wan --protocol tcp --dport 22 --jump SSH-ALL
- iptables -A SSH-ALL --protocol tcp --match recent --name SSH --set
- iptables -A SSH-ALL --protocol tcp --match recent --name SSH --update --seconds 180 --hitcount 8 --jump SSH-BLOCKED
- iptables -A SSH-ALL --protocol tcp --jump ACCEPT
- iptables -A SSH-BLOCKED -j ULOG --ulog-nlgroup 1 --ulog-prefix "Blocked SSH Event: "
- iptables -A SSH-BLOCKED -j SET --add-set blackhole src
- iptables -A SSH-BLOCKED --protocol tcp --jump DROP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement