From 4ca0abf731035fbb8c9aa20210ca3b3fda79958f Mon Sep 17 00:00:00 2001 From: FĂ©lix Sipma Date: Wed, 8 Nov 2017 15:05:32 +0100 Subject: Fail2Ban: add Filter & Action --- src/Propellor/Property/Fail2Ban.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') 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" -- cgit v1.2.3