summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFélix Sipma2017-11-08 15:05:32 +0100
committerFélix Sipma2017-11-08 15:05:32 +0100
commit4ca0abf731035fbb8c9aa20210ca3b3fda79958f (patch)
tree0493f683f85dbb7855352e29899a99793767a9e7 /src
parent41aa52e2fd1b046045c54fcfa24d8157228b8070 (diff)
Fail2Ban: add Filter & Action
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Property/Fail2Ban.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Propellor/Property/Fail2Ban.hs b/src/Propellor/Property/Fail2Ban.hs
index eed93f29..e44d449b 100644
--- a/src/Propellor/Property/Fail2Ban.hs
+++ b/src/Propellor/Property/Fail2Ban.hs
@@ -13,6 +13,10 @@ reloaded = Service.reloaded "fail2ban"
type Jail = String
+type Filter = String
+
+type Action = String
+
-- | By default, fail2ban only enables the ssh jail, but many others
-- are available to be enabled, for example "postfix-sasl"
jailEnabled :: Jail -> Property DebianLike
@@ -40,3 +44,9 @@ jailConfigured name key value =
jailConfFile :: Jail -> FilePath
jailConfFile name = "/etc/fail2ban/jail.d/" ++ name ++ ".conf"
+
+filterConfFile :: Filter -> FilePath
+filterConfFile name = "/etc/fail2ban/filter.d/" ++ name ++ ".conf"
+
+actionConfFile :: Action -> FilePath
+actionConfFile name = "/etc/fail2ban/action.d/" ++ name ++ ".conf"