Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rate limit ssh attempts to WAN zone #120

Merged
merged 9 commits into from Jan 22, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions default-files/etc/config/firewall
@@ -1,4 +1,3 @@

config defaults
option syn_flood '1'
option input 'DROP'
Expand Down Expand Up @@ -169,4 +168,4 @@ config rule
option target 'ACCEPT'

config include
option path /etc/firewall.user
option path '/etc/firewall.user'
12 changes: 12 additions & 0 deletions default-files/etc/firewall.user
@@ -0,0 +1,12 @@
# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.

#to restart the fire wall use /etc/init.d/firewall restart;

#for debugging added rules ues FW_TRACE=1 fw reload

#more details http://wiki.openwrt.org/doc/uci/firewall

iptables -I INPUT -i br-lan -p tcp --dport 22 -m state --state NEW -m recent --set
iptables -I INPUT -i br-lan -p tcp --dport 22 -m state --state NEW -m recent --update --seconds 60 --hitcount 4 -j DROP