-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Enhancement: --set-default-zone #98
Comments
Hi, What benefit does this bring? We agreed in #42 that we wouldn't use default zones for the module configuration and the user should be clear about what zone they are configuring to avoid confusion. Are you proposing this to make module configuration easier (which was already discussed in #42) or are there other benefits outside of Puppet to setting it? |
I guess there are a couple of things going on:
|
Hmm, I can't see quite what they are using it for in the jpopelka module... I guess the question is what benefit do you achieve by running that exec? What do you miss if you don't run it? I'm happy to add it if there is a use case, I just don't understand what it is yet :-) Just trying to identify why you need to do it at all when you're using puppet to manage it.... |
I would like to be able to set the default zone for two reasons:
In general we prefer not to modify the zones/services provided by upstream. Specific to the second point, imagine this scenario. A new interface is added that isn't already accounted for in a known list (because separate teams manage the [virtual] hardware and the OS configuration). We want the default to be drop everything except ICMP. The current firewalld default is "public". So for us this would mean either setting the default zone to a modified "drop" or editing the "public" zone. |
I agree, being able to set the default zone seems to me (and forgive my ignorance if I am wrong!) a standard feature you'd expect since its something that firewalld itself supports. I've been hunting for ages until I found this bug on how to set it! |
Ok, there seems to be enough interest in this feature that I've marked it as accepted. Design wise, I'm guessing since this is a fairly global option, and only one zone can be the default zone, it would make sense as an attribute to the class { 'firewalld':
...
default_zone => 'public',
} ? |
I agree that a class parameter is well suited for this. |
+1 for this feature, the proposed syntax looks good to me. |
FYI all I've been on vacation but should have time to implement this feature this week |
It would be extra convenient if one could configure the default zone easily via this module.
Right now I've added this to wrapper code:
exec { "firewalld: set default zone to "${zone}"":
command => "firewall-cmd --set-default-zone ${zone}",
path => '/bin',
logoutput => false,
unless => "firewall-cmd --get-default-zone | grep ${zone}",
#Enforces ordering, but also checks/sets after every reload...
subscribe => Exec['firewalld::reload'],
}
The text was updated successfully, but these errors were encountered: