-
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
(MODULES-8736) IPtables support on RHEL8 #824
Conversation
Hi @EmilienM . I've tested out your PR and it seems to run through our adhoc fine. However when I tried it out locally, I found that warnings would appear whenever a rule was created:
When the machine was rebooted, none of the firewall rules were saved. The same warning was returned when manually triggering |
Could you please share the manifest you used for testing, so I can reproduce on my side. Also on which platform did you try? Thanks |
@EmilienM I tested the following manifest on both RedHat 8.0 and RedHat 7.2 both running Puppet 6.4.0 and only received the warning on RedHat 8.0:
When I reboot each machine, only the rules for the RedHat 7 machine persist. Might be worth mentioning that |
Running the full acceptance suite against RedHat 8 Puppet 6 there are also some test failures that weren't caught in the adhoc (as we have not enabled Redhat 8 yet):
|
I reproduced the bug as well. Let me investigate. |
I hard to run: |
In order to persist the nftables rules on RHEL8, we need the init scripts: "Warning: Firewall[998 log all ipv4](provider=iptables): Unable to persist firewall rules: Execution of '/usr/libexec/iptables/iptables.init save' returned 1: Error: Could not execute posix command: No such file or directory - /usr/libexec/iptables/iptables.init", Those are contained in the iptables-services package, so this patch aims to add it into package_name for RHEL8. Also, to make the IPtables-managed rules persistent at reboot, we need to enable iptables (and ip6tables) service(s) like we did in previous versions of RHEL ecosystem.
Pull-request updated, HEAD is now 879838d |
@eimlav PR updated, let me know how it works for you now. Thanks |
Note: I let nftables here on purpose, because it's the new tool pushed into RHEL8 and recent Fedora - I guess it doesn't hurt. Let me know if it's blocking. |
@EmilienM I am still getting the same warning and rules are not saving. I would suggest maybe tinkering with this locally until you are able to get a solution that solves all of the issues. As we do not currently support RedHat 8 for this module, the assistance I can provide for this PR is limited. When you are able to get it to work please feel free to ping me and I'll take another took. :) |
@eimlav with my PR applied, I can't reproduced the bug anymore: |
I've tested this out on RHEL8 and haven't hit any errors. If you've hit some errors please let us know what configuration you were doing. |
puppetlabs/puppetlabs-firewall#824 is taking time to land, we need the code so IPtables rules are persistent after a reboot. We'll revert that patch once the PR is merged upstream. Change-Id: Ieb32461d43f56ef065efd23c2596686f88fdfe56
Hey @EmilienM . We have not been able to run this without the warning so it may be an issue with our RedHat 8 image. However, as you are now using the changes in your setup I take it that it is working as intended. As such I am going to go ahead and merge this now but I just wanted to let you know that this change will add RedHat 8 compatibility to the module not official support. Thanks for taking the time to go through your changes with me (and for showing asciinema it's really neat) :) |
PR was merged: puppetlabs/puppetlabs-firewall#824 This reverts commit 8271067. Change-Id: I239da1e275ff108c054b5ffbfad57169610f4a46
In order to persist the nftables rules on RHEL8, we need the init scripts:
"Warning: Firewall998 log all ipv4: Unable to persist firewall rules:
Execution of '/usr/libexec/iptables/iptables.init save' returned 1:
Error: Could not execute posix command: No such file or directory - /usr/libexec/iptables/iptables.init",
Those are contained in the iptables-services package, so this patch aims
to add it into package_name for RHEL8.
Also, to make the IPtables-managed rules persistent at reboot, we need
to enable iptables (and ip6tables) service(s) like we did in previous
versions of RHEL ecosystem.