Skip to content

Instantly share code, notes, and snippets.

@maethor
Created October 5, 2016 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maethor/48de64ccecd36041719a04a41adae823 to your computer and use it in GitHub Desktop.
Save maethor/48de64ccecd36041719a04a41adae823 to your computer and use it in GitHub Desktop.
Fail2Ban action to use shorewall-drop-wrapper.sh
#
# Author: Guillaume Subiron
#
# Block using shorewall-drop-wrapper.sh
# https://gist.github.com/maethor/2661311b394c5a610a3d258e54d8ac2a
#
[Definition]
# Option: actionstart
# Notes.: command executed once at the start of Fail2Ban.
# Values: CMD
#
actionstart =
# Option: actionstop
# Notes.: command executed once at the end of Fail2Ban
# Values: CMD
#
actionstop =
# Option: actioncheck
# Notes.: command executed once before each actionban command
# Values: CMD
#
actioncheck =
# Option: actionban
# Notes.: command executed when banning an IP. Take care that the
# command is executed with Fail2Ban user rights.
# Tags: <ip> IP address
# <failures> number of failures
# <time> unix timestamp of the ban time
# Values: CMD
#
actionban = /usr/local/sbin/shorewall-drop-wrapper drop <ip>
# Option: actionunban
# Notes.: command executed when unbanning an IP. Take care that the
# command is executed with Fail2Ban user rights.
# Tags: <ip> IP address
# <failures> number of failures
# <time> unix timestamp of the ban time
# Values: CMD
#
actionunban = /usr/local/sbin/shorewall-drop-wrapper allow <ip>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment