Open aaomidi opened 2 years ago
@aaomidi, thanks for filing this one up.
Making some notes based on our Slack exchange to make sure we don't miss this ...
Issue seems to be reproduced only in the most recent firewalld release (v0.9.x), which may explain why problem is only seen in Ubuntu 21.10 and CentOS 8.
Adding this fixes the problem in ubuntu:rolling
RUN update-alternatives --set iptables /usr/sbin/iptables-legacy
Great, so that proves your previous point that problem seemed to be about "iptables" vs "nf_tables".
If that's the case the fix will need to extend the current iptable-specific logic to address the "nf_tables" scenario.
More information:
I changed my host iptables to use iptables-legacy:
sudo update-alternatives --config iptables
And, uh, the broken containers started working fine.
Host | Container | Result |
---|---|---|
nftable | iptable | Works |
iptable | nftable | Works |
nftable | nftable | Broken - no DNS resolution |
iptable | iptable | Broken - DNS works, no internet connection |
Create a new Dockerfile:
Failing dockerfile:
Working dockerfile:
Create the network:
Run the container:
SSH into container:
Run dig: