Docker-in-LXC Firewall After Proxmox VE 9.2: Quick Fixes
Fix Docker-in-LXC firewall issues after Proxmox VE 9.2 by checking guest rules, Docker NAT, and bridge paths to keep self-hosted services reachable and secure.

On this page
After upgrading to Proxmox VE 9.2, Docker-in-LXC services often stay running while their firewall rules stop matching the new network path. The fix is to verify the container firewall, Docker's own rules inside the container, and the host bridge before you open anything wide. Once those three layers agree, your self-hosted services remain reachable from the LAN and still drop unexpected traffic.
Key Takeaways
- Check layers: Proxmox firewall and Docker rules are separate; test both before opening ports.
- Read the file: The LXC firewall file shows enable and policy values that the dashboard can hide.
- Test inside first: A successful local container request rules out the application and Docker port binding.
- Keep rules narrow: Open only the published service port, not a wide range, unless the service truly needs it.
- Revert fast: Use a snapshot and a short maintenance window so a bad rule does not strand management access.
What Usually Breaks in Docker-in-LXC Firewalls After 9.2?
Proxmox firewall and Docker firewall do not share one rule set. In a Docker LXC, traffic to a published service usually passes through the Proxmox guest firewall first, then enters the container network namespace, where Docker may add its own NAT and ACCEPT rules for the bridge network. After a 9.2 upgrade, the failure is rarely that Docker stops working. It is more often that one layer changed: a guest firewall file was cloned from an old template, a VLAN or bridge name changed, or Docker restarted and rebuilt its rules while the Proxmox firewall stayed strict.
The plain firewall file is the fastest place to start. For LXC ID 100, the file lives under the Proxmox cluster filesystem.
test -f /etc/pve/firewall/100.fw && cat /etc/pve/firewall/100.fw
A healthy but strict container may look like this:
[OPTIONS]
enable: 1
policy_in: DROP
policy_out: ACCEPT
[RULES]
IN ACCEPT -proto tcp -port 8080
IN ACCEPT -proto tcp -port 8443
If the enable setting is off, the guest firewall may not be the problem, but the datacenter or node firewall might be. If the inbound policy is drop and the Docker service port is missing, the container can be running normally while every inbound request times out.
| Layer | What it controls | Why a 9.2 upgrade can change the result |
|---|---|---|
| Datacenter or node firewall | Global default policy for guests | Upgrade or migration can expose a previously inherited setting |
| Guest firewall | Rules attached to the LXC ID | Cloned templates can carry old enable flags or old port rules |
| Docker bridge NAT | Published ports inside the LXC network namespace | Docker restarts can rebuild chains and lose manual assumptions |
| Service listener | Whether the app binds to all interfaces or only localhost | Container image updates can change default bind addresses |
If your Docker LXC sits behind a VLAN, do not skip the network side. A missing VLAN tag can look exactly like a firewall drop. Pair this check with a Proxmox VE 9.2 VLAN audit so you know the bridge and interface names before changing rules.
How to Confirm the Container Firewall Is Actually Enabled
Start at the top of the firewall chain. The datacenter firewall can enable a default policy, and the node firewall can add host-level rules. The guest firewall then applies rules to the LXC.
pvesh get /cluster/firewall
pvesh get /nodes/$(hostname)/firewall
pvesh get /nodes/$(hostname)/lxc/100/firewall
If the guest firewall is missing, the API output may be sparse. If it exists, look for the enable setting and the inbound policy. You can also verify that the Proxmox firewall service is running on the node.
systemctl status pve-firewall --no-pager
If the Proxmox firewall service is stopped, guest rules are not applied even when the file looks correct. If the guest firewall is not enabled and you want to manage inbound ports explicitly, enable it through the API rather than clicking around while the service is down.
pvesh set /nodes/$(hostname)/lxc/100/firewall -enable 1
Then confirm the container still has its expected network interface. A Docker LXC usually uses eth0 inside the container, but a template or cloud-init change can surprise you.
pct exec 100 -- ip -br link
pct exec 100 -- ip -4 -br addr show dev eth0
One gotcha I have hit after upgrades is that the container firewall file can be present but disabled because the container was cloned from an older template. The GUI may make it look like the container is using a node default, while the file still contains an old disabled setting. That is why the file check matters even when the dashboard looks normal.
How to Test the Rule Path from the Host to the Service
Do not start by opening ports. Start by proving where the connection stops. First, confirm Docker is publishing the port you expect.
pct exec 100 -- docker ps --format '{{.Names}} {{.Ports}}'
If the port mapping is localhost-only, the service is not reachable from another host, no matter how many firewall rules you add. If it is published on all interfaces, the container is at least listening on an interface the LAN can use.
Next, check what is listening inside the container network namespace.
pct exec 100 -- ss -ltnp
Then test from inside the container. This bypasses the Proxmox firewall and tells you whether the application itself is healthy.
pct exec 100 -- curl -sS -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8080/health
Now test from the Proxmox host using the container address. The exact IP will depend on your network, but the pattern is the same.
IP=$(pct exec 100 -- ip -4 -br addr show dev eth0 | awk '{print $3}' | cut -d/ -f1)
curl -sS -o /dev/null -w '%{http_code}\n' http://$IP:8080/health
If the inside-container test succeeds and the host test fails, the problem is usually the guest firewall, the host bridge, or routing. If both fail, look at Docker and the application first. If the host test succeeds but a LAN client fails, look at VLANs, host bridge rules, or upstream routing.
Firewall logs can confirm whether the drop is coming from Proxmox. A short log window is enough when you are testing one service.
journalctl --since '10 minutes ago' --no-pager | grep -i 'firewall\|DROP'
This is not elegant, but it is practical. If you see repeated drops for the container address, you have a firewall rule to fix. If you see nothing, the packet may not be reaching the container at all.
What to Check When Docker Bypasses Your LXC Firewall
Docker inside LXC has its own network behavior. When Docker publishes a port, it may create rules in the container network namespace so traffic arriving on the container interface is forwarded to the Docker bridge. Those rules do not necessarily appear in the Proxmox firewall GUI, and they do not replace the Proxmox firewall.
Check the container for Docker-related rules.
pct exec 100 -- sh -c 'iptables -S 2>/dev/null | grep -E "DOCKER|172\.17" || nft list ruleset 2>/dev/null | grep -E "docker|172\.17"'
You may see output similar to this:
-A DOCKER -d 172.17.0.2/32 ! -i docker0 -o docker0 -p tcp -m tcp --dport 8080 -j ACCEPT
That rule is Docker doing its job inside the LXC. It does not mean the Proxmox firewall is disabled. It only means that, once the packet is allowed into the container network namespace, Docker knows how to forward it.
Bridge mode is the usual default
With the default Docker bridge, published ports are mapped into the container network namespace. Your Proxmox guest firewall still decides whether the container interface receives the request. This is where many people get confused: Docker can look healthy because its own chains are present, while the Proxmox firewall is still dropping the packet before Docker sees it.
Host mode removes the Docker bridge layer
If you run Docker with host networking, the service listens directly on the container interface. In that case, the Docker bridge rules may be absent, and your guest firewall rules become more important. This is a common source of confusion after an upgrade: one compose file used a bridge port mapping, another uses host networking, and the same firewall rule set no longer behaves the same way for both.
A useful habit is to separate management traffic from application traffic. For example, keep SSH on the LXC interface, and expose only the reverse proxy ports through Docker. If a dashboard, database, or metrics endpoint does not need LAN access, do not add a firewall rule for it just because the Docker container can reach it internally.
How to Repair Missing Rules Without Breaking Self-Hosted Services
Make one small change at a time. I usually give myself a 10-minute window to test and revert. If the service is still unreachable after one rule edit and one firewall restart, I stop guessing and restore the previous state.
- Take a quick snapshot before changing the firewall file.
pct snapshot 100 pre-firewall-92
- Add only the port the service actually needs. For a self-hosted app on port 8080, the rule can be narrow.
[RULES]
IN ACCEPT -proto tcp -port 8080
- If the service should only be reachable from a management network, restrict the source.
IN ACCEPT -proto tcp -port 8080 -source 192.168.10.0/24
- Restart the Proxmox firewall service after editing the file.
systemctl restart pve-firewall
- Test again from the host and from a client.
IP=$(pct exec 100 -- ip -4 -br addr show dev eth0 | awk '{print $3}' | cut -d/ -f1)
curl -sS -o /dev/null -w '%{http_code}\n' http://$IP:8080/health
The restart can briefly interrupt connections, so treat it like a small maintenance action rather than a harmless click. The tradeoff with narrow rules is maintenance. Narrow rules are safer, but they require attention when a compose file changes a published port. A database port that moves from 5432 to 5433 will not fix itself. That is a good trade in my opinion, because the alternative is a wide open inbound policy that quietly accepts traffic you forgot you exposed.
Before doing this across several containers, make sure your backup path is credible. A PBS S3 restore RPO test for Proxmox VE LXC containers is a good way to prove you can recover the container if a firewall change locks you out of management.
Common Upgrade Gotchas and Tradeoffs
The most annoying failure is a healthy-looking container with a dead inbound path. Docker restarts, the application responds inside the container, and the web UI works from the Proxmox host, but a laptop on the LAN gets a timeout. That pattern usually means the packet is being dropped before it reaches the Docker forward rule.
Check the firewall options directly.
test -f /etc/pve/firewall/100.fw && grep -E 'enable|policy_in|policy_out' /etc/pve/firewall/100.fw
If the output shows the enable setting as off, the guest firewall is not the blocker. If the inbound policy is drop and there is no matching inbound accept rule, you have found the likely problem.
Another gotcha is Docker starting before the container network is fully ready after an upgrade. If Docker itself is failing, firewall rules are not the first place to look. For unprivileged LXC containers, nested container runtime issues often trace back to cgroup handling. Run the cgroup v2 audit for LXC containers on Proxmox VE 9.2 before you start adding firewall exceptions.
There is also a security tradeoff between privileged and unprivileged LXC containers. Privileged containers often make Docker networking feel simpler because the container has more direct access to kernel features. Unprivileged containers are safer for self-hosted workloads, but they can make Docker networking less predictable when cgroups, namespaces, and firewall backends change during an upgrade. I keep unprivileged as the default and only move a specific workload to privileged when I have a clear reason.
Do not confuse reachable with secure. A reverse proxy in Docker can expose one or two ports, while the actual applications stay private. That is usually the cleanest pattern after a 9.2.1 upgrade: the Proxmox firewall protects the LXC, Docker forwards only what the proxy needs, and the application containers listen only on the Docker network.
Conclusion
After upgrading to Proxmox VE 9.2, Docker-in-LXC firewall problems are usually a layer mismatch, not a broken container. Verify the guest firewall, Docker's in-container rules, and the service listener before changing anything, then add only the narrow port rules your self-hosted services need. Your next step is to pick one Docker LXC, test the connection from inside the container and from the host, and repair the first missing rule before moving to the rest of the fleet.


