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

ignoreip in custom jails not populating #120

Closed
harisuseki opened this issue Oct 23, 2019 · 3 comments
Closed

ignoreip in custom jails not populating #120

harisuseki opened this issue Oct 23, 2019 · 3 comments

Comments

@harisuseki
Copy link

harisuseki commented Oct 23, 2019

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.10.12
  • Ruby: 2.1.0 (included with puppet)
  • Distribution: Ubuntu 16.04
  • Module version: 2.4.1

How to reproduce (e.g Puppet code you use)

Add the line ignoreip: ['127.0.0.1', '192.168.1.1/24'] for your custom jail as per documentation

What are you seeing

in my custom jail, I get the following line for ignoreip:
ignoreip =

What behaviour did you expect instead

I expected to see ignoreip = 127.0.0.1 192.168.1.1/24 in my custom jail config file

Any additional information you'd like to impart

If I modify templates/common/custom_jail.conf.epp and change the following line (line 25 for me) from:
ignoreip = <% $ignoreip.join(' ') -%>
to:
ignoreip = <%= $ignoreip.join(' ') -%>

Then the ignoreip in my custom jail populates correctly.

@israelriibeiro
Copy link

israelriibeiro commented Oct 28, 2019

I think the problem is in how you configure your fail2ban . My main problem is that i can't find the template.

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Could not find template 'fail2ban/xenial/etc/fail2ban/jail.conf.epp' at /etc/puppetlabs/code/environments/production/modules/fail2ban/manifests/init.pp:67:26 on node

@harisuseki
Copy link
Author

That's an interesting idea, although I have had no errors regarding the module finding any templates. Also, as soon as I change the assignment variable in the custom jail template to include the '=' (ignoreip = <%= $ignoreip.join(' ') -%>), the values are retrieved from the yaml and joined and populated correctly.

@dhoppe
Copy link
Member

dhoppe commented Apr 21, 2020

This problem has already been solved by #109.

@dhoppe dhoppe closed this as completed Apr 21, 2020
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

No branches or pull requests

3 participants