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

Authentication attempts limit #116

Closed
wants to merge 3 commits into from
Closed
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
4 changes: 3 additions & 1 deletion default-files/etc/config/firewall
@@ -1,4 +1,3 @@

config defaults
option syn_flood '1'
option input 'DROP'
Expand Down Expand Up @@ -167,3 +166,6 @@ config rule
option src 'vpn'
option proto 'icmp'
option target 'ACCEPT'

config include
option path '/etc/firewall.user'
15 changes: 15 additions & 0 deletions default-files/etc/firewall.user
@@ -0,0 +1,15 @@
# 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

#if it didn't work remove "-i br-lan" to accept any interface

iptables -I INPUT -i br-lan -p tcp -m tcp --dport 22 -m recent --set --name DEFAULT --rsource

iptables -I INPUT -i br-lan-p tcp -m tcp --dport 22 -m recent --update --seconds 180 --hitcount 4 --name DEFAULT --rsource -j DROP
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line causes a fatal error on startup. Should be ...br-lan -p...