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

manage_firewall option #53

Closed
minorOffense opened this issue Dec 7, 2017 · 12 comments
Closed

manage_firewall option #53

minorOffense opened this issue Dec 7, 2017 · 12 comments
Assignees

Comments

@minorOffense
Copy link
Contributor

Hello

I'd like to suggest a feature for this module and the ossec-puppet module. Add an option for the agent class to manage the firewall automatically with puppetlabs/firewall

Similar to what the puppet/zabbix module does. Help make the installation that much easier.

If you're interested in this feature I'm willing to put dev time into it. Just want to make sure it's something you're interested in.

Thanks.

@jlruizmlg
Copy link

That makes sense! Thanks!

@jlruizmlg jlruizmlg self-assigned this Dec 8, 2017
@jlruizmlg
Copy link

Hi @minorOffense can you take a look the following branch?

https://github.com/wazuh/wazuh-puppet/tree/iptables

We have included two new options in the class server and client:

  # Manage firewall
   if $manage_firewall {
     include firewall
     firewall { '1514 wazuh-manager':
       dport  => $ossec_server_port,
       proto  => 'udp',
       action => 'accept',
       state  => [
         'NEW',
         'RELATED',
         'ESTABLISHED'],
    }
  }
  # Manage firewall
   if $manage_firewall {
     include firewall
     firewall { '1514 wazuh-agent':
       dport  => $ossec_server_port,
       proto  => 'udp',
       action => 'accept',
       state  => [
         'NEW',
         'RELATED',
         'ESTABLISHED'],
    }
  }

@minorOffense
Copy link
Contributor Author

minorOffense commented Dec 11, 2017 via email

@minorOffense
Copy link
Contributor Author

minorOffense commented Dec 13, 2017

I just tried the iptables branch and I get this when I don't specify anything for firewall

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Wazuh::Server]: parameter 'manage_firewall' expects a Boolean value, got Undef at /etc/puppetlabs/code/environments/port_coldfront/modules/coldfront/manifests/profile.pp:472:3 on node...

And my class def looks like this

  class { 'wazuh::server':
    smtp_server => 'localhost',
    ossec_emailto => lookup('ossec::emails', {merge => 'unique', default_value => []}),
    require => [Class['java'], Class['elastic_stack::repo']],
  }

Presumably this should work because I should have to pass a value. Should pick up the default from params.

@jlruizmlg
Copy link

@minorOffense
Copy link
Contributor Author

minorOffense commented Dec 14, 2017 via email

@jlruizmlg
Copy link

Hi @minorOffense you are totally right, I had a typo in the params variable, fixed in the following commit: cbd7750

@minorOffense
Copy link
Contributor Author

Cool, I'll deploy it again and give it another shot.

@minorOffense
Copy link
Contributor Author

minorOffense commented Dec 22, 2017 via email

@jlruizmlg
Copy link

Hi @minorOffense sorry for the late response, has been a crazy month, merged with the master in the commit
203b9f9

@minorOffense
Copy link
Contributor Author

No worries. Thanks for the merge!

@jlruizmlg
Copy link

Cheers from Ontario as well.

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

2 participants