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

Why is firewalld being "deactivated" #146

Closed
r3pek opened this issue Apr 29, 2020 · 2 comments · Fixed by #147
Closed

Why is firewalld being "deactivated" #146

r3pek opened this issue Apr 29, 2020 · 2 comments · Fixed by #147

Comments

@r3pek
Copy link

r3pek commented Apr 29, 2020

OK, not really a bug, unless it can be activated, but since I didn't read anything on the commit log on the why firewalld support is being removed I'm gonna just ask the why and/or if it can be non-deactivated.

@dhoppe
Copy link
Member

dhoppe commented Apr 30, 2020

The module was created at that time without support for firewalld. In the meantime CentOS offers dedicated packages like fail2ban-firewalld. You just have to overwrite the parameter as follows:

class { 'fail2ban':
  package_name => 'fail2ban-firewalld',
}

By the way, there is a reason why we use .github/ISSUE_TEMPLATE.md. Right now I can only guess which environment you are using.

@r3pek
Copy link
Author

r3pek commented Apr 30, 2020

By the way, there is a reason why we use .github/ISSUE_TEMPLATE.md. Right now I can only guess which environment you are using.

Fair enough. As it was a simple question i cleaned it up, but I'm on CentOS 7 (sorry about that).

The module was created at that time without support for firewalld. In the meantime CentOS offers dedicated packages like fail2ban-firewalld. You just have to overwrite the parameter as follows:

Well, that package is already pulled it by the default install, the problem is that the module is actually deleting the installed files from the package:

# rpm -ql fail2ban-firewalld
/etc/fail2ban/jail.d/00-firewalld.conf

https://github.com/voxpupuli/puppet-fail2ban/blob/master/manifests/config.pp#L36-L42

      # Not using firewalld by now
      file { '00-firewalld.conf':
        ensure  => 'absent',
        path    => "${fail2ban::config_dir_path}/jail.d/00-firewalld.conf",
        notify  => $fail2ban::config_file_notify,
        require => $fail2ban::config_file_require,
      }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants