Created
October 31, 2013 12:32
-
-
Save vgrish/7248912 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Очистка цепочек правил | |
iptables -F INPUT | |
iptables -Z INPUT | |
iptables -P INPUT ACCEPT | |
iptables -F OUTPUT | |
iptables -Z OUTPUT | |
iptables -P OUTPUT ACCEPT | |
iptables -F FORWARD | |
iptables -Z FORWARD | |
iptables -P FORWARD ACCEPT | |
# Защита порта ssh, время блокировки - 30 секунд | |
iptables -A INPUT -p tcp -m state --state NEW --dport 22 -m recent --update --seconds 30 -j DROP | |
iptables -A INPUT -p tcp -m state --state NEW --dport 22 -m recent --set -j ACCEPT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment