Last active
January 28, 2019 13:35
-
-
Save Dliv3/4bb82fd1f7745b5df07e4a47507c594d 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
# https://www.freebuf.com/articles/network/137683.html | |
# 端口复用链 | |
iptables -t nat -N LETMEIN | |
# 端口复用规则 | |
iptables -t nat -A LETMEIN -p tcp -j REDIRECT --to-port 22 | |
# 开启开关 | |
iptables -A INPUT -p tcp -m string --string 'threathuntercoming' --algo bm -m recent --set --name letmein --rsource -j ACCEPT | |
# 关闭开关 | |
iptables -A INPUT -p tcp -m string --string 'threathunterleaving' --algo bm -m recent --name letmein --remove -j ACCEPT | |
# let's do it | |
iptables -t nat -A PREROUTING -p tcp --dport 80 --syn -m recent --rcheck --seconds 3600 --name letmein --rsource -j LETMEIN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment