-
Notifications
You must be signed in to change notification settings - Fork 685
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
[Focal] iptables rules are not applied on boot #5776
Comments
If this is a discrepancy between Vagrant boxes (we use the Bento images: https://github.com/chef/bento/tree/3dd165cf422572ab4240c8f1ce9a7e40b7960457/packer_templates/ubuntu), then it should be easy to reproduce in Focal staging VMs on Qubes, since those are configured directly from an ISO. I took a look at #5712 recently, and while I had questions, the iptables rules were definitely populated. @emkll suggested in standup today to force-reboot the VMs post-provisioning and check again, see if the firewall rules don't restore. @kushaldas also requests a full list of all installed packages inside the hardware Focal instance to aid in debugging. |
See the following files for installed packages on a default Focal install on hardware: |
Can't replicate this on Focal VMs (bento-20.04, 202008.16.0). iptables rules are present and survive a reboot. Gonna try a hardware install next and see if I can replicate. |
I can finally reproduce this. After I did a reboot of the |
On Ubuntu Focal, we can use iptables-persistent package, and also uses updated rules filepath based on distribution version.
Was able to reproduce the issue in Qubes Focal VMs. Although I recalled that during initial review of #5712, the iptables tests were passing, I didn't actually document that in the PR comments. |
@kushaldas I see you've got a PR in #5780 to force the rules to persist on Focal post-reboot. Do you have a hypothesis for why the hardware installs behave differently from the VM installs? Looking through the bento configs, it's not obvious to me what the discrepancy is. I'll review the package lists above next. |
Nope, I could not identify that part. |
Here's a diff of the package lists, for comparison's take. The reference is the hardware install, the changes (+/-) are what's installed in the VM image. All packages included in both are omitted. package list diff
There are several net-related packages like cifs-utils, cloud-guest-utils, ifupdown, and nfs-common, but I haven't found a succinct explanation yet. Note also the |
Simply installing |
On Ubuntu Focal, we can use iptables-persistent package, and also uses updated rules filepath based on distribution version.
On Ubuntu Focal, we can use iptables-persistent package, and also uses updated rules filepath based on distribution version.
On Ubuntu Focal, we can use iptables-persistent package, and also uses updated rules filepath based on distribution version.
On Ubuntu Focal, we can use iptables-persistent package, and also uses updated rules filepath based on distribution version.
On Ubuntu Focal, we can use iptables-persistent package, and also uses updated rules filepath based on distribution version.
…-for-focal Fixes #5776 adds iptables-persistent dependency on Focal
Description
Towards #4768
The firewall logic is not working reliably in Ubuntu Focal, and firewall rules are not correctly restored on boot. This appears to be a discrepancy between Vagrant boxes and a default Ubuntu 20.04 install.
Steps to Reproduce
In an Ubuntu Focal install (non-staging, and likely non-VM), run
sudo iptables -L
orsudo ip6tables -L
Expected Behavior
iptables and ip6tables rules should be correctly applied and enforced, with default DROP policy
Actual Behavior
iptables rules are set to overly permissive defaults:
The text was updated successfully, but these errors were encountered: