-
Notifications
You must be signed in to change notification settings - Fork 456
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
Firewall chains can't have "-A" in their names or the firewall rule regex gets confused #1170
Comments
Avoid -A in chain See puppetlabs/puppetlabs-firewall#1170
And I guess one last note, this bug is present event with non-puppet generated chains. So if someone is manually maintaining part of a firewall and they have a chain with a -A in the name they can't run puppet firewall. Doesn't matter if you reference it or not, the fact that it is in the firewall causes the bug. |
Can confirm this is affecting my environment as well. I am using puppet to manage nodes for a kubernetes cluster and the cluster generates chains such as |
#1210 works in our environment on Ubuntu 22.04 & 20.04 k8s nodes. |
The pam_firewall module currently uses structures that are removed from newer versions of the firewall module. Unfortunately, puppetlabs/puppetlabs-firewall#1170 prevents us from moving directly to the latest. Until that is resolved, this commit pins to a known working version of the module.
This can be closed, the MR above fixes the issue. |
Describe the Bug
When debugging the upgrade to the v7 of puppetlabs-firewall our rules stopped working. We were getting
After a lot of debugging, I found that the regex in
def self.rule_to_name
was getting confused with the-A
in our firewall chain namedCOLDFRONT-ACCESS
.See the debug output I had added here:
You can see it thought the name of the chain was a firewall rule.
Expected Behavior
Allow any valid string to be used as a firewall chain name.
Steps to Reproduce
SOMETHING-ACCESS
Environment
Additional Context
It also matches on the ":ZABBIX-AGENT - [0:0]" string too.
These firewall chain names worked in earlier versions just fine as well.
The text was updated successfully, but these errors were encountered: