voxpupuli / puppet-fail2ban

This module installs, configures and manages the Fail2ban service.
Apache License 2.0
31 stars 106 forks source link

Firewall and fail2ban with puppet. #226

Open Ari33260 opened 4 weeks ago

Ari33260 commented 4 weeks ago

Hi, there,

I use Fail2ban and Firewall with puppet, my problem is simple but complex. I can't ignore my Fail2ban SSHD INPUT and chain. Despite the IGNORE directives, Puppet refuses to apply my configuration or my rules are overwritten.

I wonder if https://github.com/voxpupuli/puppet-fail2ban/issues/22 is up to date...

Thanks

Ari33260 commented 4 weeks ago

I've found the solution:

The error was :

Error: Found 1 dependency cycle: [...] => [...] => [...] Error: Failed to apply catalog: One or more resource dependency cycles detected in graph

When I wanted to purge each chain, I had a dependency problem because I forgot to delete the Firewall part:

class myfirewallmodule {
  resources { 'firewall':
    purge => true,
  }
  Firewall {
    before  => Class['myfirewallmodule::chainsconfiguration'],
    require => Class['myfirewallmodule::myrules'],
  }
 [...]
}