-
Notifications
You must be signed in to change notification settings - Fork 881
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
Port Forwarding does not work on RHEL 8 with Firewalld running with FirewallBackend=nftables #2496
Comments
FirewallBackend=nftables
This happens because Docker configures rules via
Note the priority of this chain:
Thus the iptables-managed chain runs first, and accepts packets. Then the firewalld-managed chain runs, which rejects them. Libvirt also ran into this problem and solved it by creating its own zone. Docker could do the same, with something like:
Note that Libvirt tells firewalld to put its interfaces into the It's also worth noting that due to firewalld/firewalld#177, firewalld's |
If firewalld is running, add the docker interface to the trusted zone to allow container networking Fixes: moby#2496 Signed-off-by: Arko Dasgupta <[email protected]>
If firewalld is running, add the docker interface to the trusted zone to allow container networking for distros with Firewalld enabled Fixes: moby#2496 Signed-off-by: Arko Dasgupta <[email protected]>
If firewalld is running, add the docker interfaces to the trusted zone to allow container networking for distros with Firewalld enabled Fixes: moby#2496 Signed-off-by: Arko Dasgupta <[email protected]>
If firewalld is running, create a new docker zone and add the docker interfaces to the docker zone to allow container networking for distros with Firewalld enabled Fixes: moby#2496 Signed-off-by: Arko Dasgupta <[email protected]>
If firewalld is running, create a new docker zone and add the docker interfaces to the docker zone to allow container networking for distros with Firewalld enabled Fixes: moby#2496 Signed-off-by: Arko Dasgupta <[email protected]>
If firewalld is running, create a new docker zone and add the docker interfaces to the docker zone to allow container networking for distros with Firewalld enabled Fixes: moby#2496 Signed-off-by: Arko Dasgupta <[email protected]>
If firewalld is running, create a new docker zone and add the docker interfaces to the docker zone to allow container networking for distros with Firewalld enabled Fixes: moby#2496 Signed-off-by: Arko Dasgupta <[email protected]>
If firewalld is running, create a new docker zone and add the docker interfaces to the docker zone to allow container networking for distros with Firewalld enabled Fixes: moby#2496 Signed-off-by: Arko Dasgupta <[email protected]>
If firewalld is running, create a new docker zone and add the docker interfaces to the docker zone to allow container networking for distros with firewalld enabled Fixes: moby#2496 Signed-off-by: Arko Dasgupta <[email protected]>
full diff: moby/libnetwork@2e24aed...9e99af2 - moby/libnetwork#2548 Add docker interfaces to firewalld docker zone - fixes docker/for-linux#957 DNS Not Resolving under Network [CentOS8] - fixes moby/libnetwork#2496 Port Forwarding does not work on RHEL 8 with Firewalld running with FirewallBackend=nftables - store.getNetworksFromStore() remove unused error return - moby/libnetwork#2554 Fix 'failed to get network during CreateEndpoint' - fixes/addresses docker/for-linux#888 failed to get network during CreateEndpoint - moby/libnetwork#2558 [master] bridge: disable IPv6 router advertisements - moby/libnetwork#2563 log error instead if disabling IPv6 router advertisement failed - fixes docker/for-linux#1033 Shouldn't be fatal: Unable to disable IPv6 router advertisement: open /proc/sys/net/ipv6/conf/docker0/accept_ra: read-only file system Signed-off-by: Sebastiaan van Stijn <[email protected]>
full diff: moby/libnetwork@2e24aed...9e99af2 - moby/libnetwork#2548 Add docker interfaces to firewalld docker zone - fixes docker/for-linux#957 DNS Not Resolving under Network [CentOS8] - fixes moby/libnetwork#2496 Port Forwarding does not work on RHEL 8 with Firewalld running with FirewallBackend=nftables - store.getNetworksFromStore() remove unused error return - moby/libnetwork#2554 Fix 'failed to get network during CreateEndpoint' - fixes/addresses docker/for-linux#888 failed to get network during CreateEndpoint - moby/libnetwork#2558 [master] bridge: disable IPv6 router advertisements - moby/libnetwork#2563 log error instead if disabling IPv6 router advertisement failed - fixes docker/for-linux#1033 Shouldn't be fatal: Unable to disable IPv6 router advertisement: open /proc/sys/net/ipv6/conf/docker0/accept_ra: read-only file system Signed-off-by: Sebastiaan van Stijn <[email protected]> Upstream-commit: 219e7e7ddcf5f0314578d2a517fc0832f03622c1 Component: engine
If firewalld is running, create a new docker zone and add the docker interfaces to the docker zone to allow container networking for distros with firewalld enabled Fixes: moby#2496 Signed-off-by: Arko Dasgupta <[email protected]> (cherry picked from commit 7a72092) Signed-off-by: Sebastiaan van Stijn <[email protected]>
If firewalld is running, create a new docker zone and add the docker interfaces to the docker zone to allow container networking for distros with firewalld enabled Fixes: moby/libnetwork#2496 Signed-off-by: Arko Dasgupta <[email protected]>
With RHEL8 and Firewalld with FirewallBackend=nftables enabled, docker port forwarding (e.g.
docker run --name test-nginx -p 8080:80 -d nginx
)does not workMight need to revisit the logic in https://github.com/docker/libnetwork/blob/master/iptables/firewalld.go to get this to work
Workaround -
FirewallBackend
in/etc/firewalld/firewalld.conf
toiptables
firewall-cmd --permanent --zone=trusted --add-interface=docker0; firewall-cmd --reload
The text was updated successfully, but these errors were encountered: