IMD SolutionComputing LibraryShop main store

Troubleshooting

Docker iptables raw table does not exist on an edge gateway

Edge computing and IIoT Published 7 min read

Short answer

A raw table does not exist error during docker compose up is kernel-side: the gateway's kernel provides no legacy iptable_raw module, so the daemon cannot program its direct-access filtering DROP rule. Probe the raw table and the module directly, keep one default route on the internet-facing port, and fix it by installing a newer vendor software image — 1V8.2 to 1V8.3.1 cleared it in the reported case. The iptables false and host-network workarounds both break port mapping.

On this page
  1. What the daemon asks the kernel for
  2. Reproduce the fault without your compose project
  3. Read the raw table and the backend
  4. Probe whether the module exists
  5. Rule out the two-interface routing explanation
  6. Weigh the two workarounds before you use them
  7. Resolve it with a newer vendor software image
  8. If your error is not this error
  9. Questions asked

An iptables raw table error during docker compose up is a kernel fault on the edge gateway, not a fault in your compose file, Dockerfile or network layout: the image's kernel provides no legacy raw table, so the Docker daemon cannot program its direct-access filtering DROP rule when it creates a container endpoint. Probe the kernel directly — read the raw table with sudo iptables -t raw -L -n, then try sudo modprobe iptable_raw — and keep exactly one default route on the internet-facing port while you test. The fix is a newer vendor software image: in the reported case, moving the gateway from image 1V8.2 to 1V8.3.1 cleared the error and normal port mapping came back. The two workarounds that let a build finish, "iptables": false in daemon.json and --network=host, both break the port publishing the application depends on.

What the daemon asks the kernel for #

Docker's bridge driver programs packet-filter rules every time it creates a container endpoint. One of them, the direct-access filtering DROP rule, lives in the raw table of netfilter: it drops packets addressed directly to a container IP from outside the bridge, so a remote host cannot bypass the published-port path your project defines. The raw table exists only if the kernel provides it. The legacy xtables backend takes it from the iptable_raw module, and when that module is missing from the image's kernel the iptables tool answers with the Table does not exist (do you need to insmod?) line and the daemon aborts endpoint creation. The container never receives networking, and compose up stops before your application starts.

The daemon error, as the failing gateway printed it (the endpoint and network names are the project's own):

Error response from daemon: failed to set up container networking: failed to create endpoint edgedevice-backend-1 on network edgedevice_default: Unable to enable DIRECT ACCESS FILTERING - DROP rule: (iptables failed: iptables v1.8.9 (legacy): can't initialize iptables table `raw': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.

The message names its own two candidates: a kernel module that is not loaded, or an iptables and kernel pair that do not match. Nothing in the Dockerfile or compose.yaml can create a kernel table — as with fixing a Docker shared library error on an edge PC, the fault lives in the environment the image runs on, not in the image. Upstream reports agree: engines in the 28.x line program the direct-access filtering rule, and the same failure appears on kernels built without iptable_raw — an engine 28.2 update broke container networking on JetPack kernels lacking the module, and a distribution kernel for Raspberry Pi boards built without the legacy iptables modules ip_tables.ko, iptable_nat.ko and iptable_filter.ko broke Docker the same way.

A parse-time compose fault looks different: a syntax message such as the Docker Compose logging options must be a mapping error fails the file before the daemon touches the network. This failure comes later, while the daemon is programming rules.

Reproduce the fault without your compose project #

  1. Record the gateway's installed software image version; the reported failure was on 1V8.2.
  2. Start a minimal container that still needs a bridge endpoint: sudo docker run --rm alpine true.

Decisions:

  • The same raw table error appears: the fault is kernel-side and independent of your project. Continue with the raw table read below.
  • The container runs: the kernel is fine and the failure is specific to the compose network, edgedevice_default in the reported case. Compare that network's driver options and any iptables-related settings in the project, restart the Docker service, and repeat the test; if the project still fails while the minimal container runs, the difference is in the project's network definitions.

Read the raw table and the backend #

Run sudo iptables -t raw -L -n and sudo iptables --version. The failing gateway reported iptables v1.8.9 (legacy), so the legacy backend was in use.

Reading Meaning Next step
The same Table does not exist message The kernel exposes no legacy raw table Probe the module below
PREROUTING and OUTPUT chains listed The table is present; the daemon may have started before the module loaded Restart the Docker service, repeat the minimal container test, and read the daemon log with journalctl -u docker if it persists
Command not found or permission denied Wrong path or missing privilege Repeat with sudo and the full binary path

Probe whether the module exists #

  1. List the table modules currently loaded: lsmod | grep -i iptable.
  2. Try to load the raw table module: sudo modprobe iptable_raw, then repeat sudo iptables -t raw -L -n.

Decisions:

  • modprobe succeeds and the table lists: the module was present but unloaded. Persist it in the image's module autoload configuration, on systemd-based images a file under /etc/modules-load.d, restart the Docker service, and repeat the minimal container test.
  • modprobe reports the module cannot be found: the kernel was built without the legacy raw table, and no daemon or compose setting can compensate. Stop working around and move to the image update — this is the decision point for the reported fault.
  • The version output shows (nf_tables) while the daemon logs a legacy error: your shell and the daemon may be using different backends. Read the table through the same backend the daemon uses before concluding the kernel lacks it.

Rule out the two-interface routing explanation #

The reported gateway used two ports: eth0 with a static IP for application traffic, and eth1 facing the internet for registry pulls. Two interfaces raise a fair routing question, because Linux keeps one default route unless you configure policy routing — but routing cannot produce this error. The daemon programs its netfilter rules locally at endpoint creation, before any packet is routed.

Confirm the separation anyway:

  1. Run ip route. Expect exactly one default line, on the internet-facing port — eth1 in the reported setup. A second default line is a separate routing design problem that needs its own routing table, not this fault.
  2. Run sudo docker run --rm alpine true with the application port disconnected. An unchanged raw table error excludes routing as the cause.

If the symptom changes from the table error to pull or pip timeouts, the subject has moved to routing or DNS. The same dual-port design also decides how PLC traffic leaves the gateway — edge gateway Modbus TCP polling over the WAN port covers that path.

Weigh the two workarounds before you use them #

Both workarounds that let the reported build pass remove networking the application depends on.

Workaround What it changes What it costs
"iptables": false in /etc/docker/daemon.json The daemon stops programming netfilter rules, so endpoint creation succeeds and downloads complete ports entries such as "8070:80" stop publishing, and bridge containers lose the daemon's outbound NAT, so the application is unreachable from the plant network
--network=host The container shares the host stack; no bridge endpoint is created, so no raw rule is needed ports entries are ignored, host bindings can collide, and service-name resolution over compose networks does not apply
Host network for the build only (build.network: host) Build-time registry downloads run on the host stack while runtime keeps bridge networking Runtime still fails on the same missing table

Use build.network: host to keep dependency installation moving during diagnosis; treat it as a bridge to the fix, not the fix. The application needs port mapping at runtime, so the missing table still has to be resolved — on a vendor image, that resolution lives in the software image, not in a setting.

Resolve it with a newer vendor software image #

Moving the reported gateway from image 1V8.2 to 1V8.3.1 cleared the error, and the build and run completed with normal bridge networking. What changed between the images was not identified, so read the release notes for the newer image before you plan the window. This is the clean path whenever modprobe cannot find the module, because only the vendor builds the image's kernel: a kernel update inside the OS, a hand-built module or a swapped iptables backend on a vendor image is unsupported territory.

  1. Back up the compose project, application data and any volumes you cannot rebuild.
  2. Put the gateway in a maintenance window: the image update and the Docker restart drop every published service on the box.
  3. Install the newer software image using the vendor's documented update procedure.
  4. Confirm the installed image version after reboot.
  5. Undo the workarounds: remove "iptables": false from daemon.json, remove --network=host from run commands, and restart the Docker service.
  6. Run sudo iptables -t raw -L -n; it must list PREROUTING and OUTPUT without error.
  7. Run sudo docker run --rm alpine true; it must start and exit clean.
  8. Run docker compose up with your project, then open a published port from a plant-network client to confirm the mapping answers.

Decision: if the raw table lists and the minimal container runs, the kernel fault is closed; if compose up still fails after that, the difference is in the project's network definitions, not in the kernel — which is the branch the reproduce step separated at the start.

If your error is not this error #

Daemon-side faults on a gateway Docker install each point to their own layer: parse failures name the file line, runtime failures name a kernel module or table. A balena socket permission error during compose up is a different gateway fault with its own resolution.

Questions asked

Why does a missing kernel table stop docker compose up before my application even starts?

Endpoint creation comes first. The daemon programs the bridge network's rules, including the direct-access filtering DROP rule in the raw table, before it attaches your container and starts any process. When the kernel cannot provide that table, the daemon aborts the endpoint and the application stage is never reached. The compose file has already been parsed and accepted by then, which is why the error names iptables and the kernel instead of any file line.

Can I pin Docker Engine to an older release instead of updating the gateway image?

Upstream reports show pinning the engine to a release from before the direct-access filtering rule kept containers running on kernels without iptable_raw. On a vendor image you usually cannot choose the engine version, and a pin freezes security fixes for the service that faces the plant network. Where a pin is possible at all, treat it as a dated temporary measure and keep the image update as the actual fix.

Does setting iptables to false in daemon.json weaken the host firewall?

No. The key only stops the Docker daemon from programming its own rules; rules the image or your firewall tooling installed stay active. What you lose is Docker-managed connectivity: ports entries stop publishing and bridge containers lose the outbound NAT rule, so containers cannot reach external services at runtime. That is why the setting lets builds pass while the running application stays unreachable.

Could I just allow direct access to container IPs and skip the rule?

Direct access without the filtering rule is the side effect you get when iptables is set to false: nothing blocks traffic straight to container IPs, but ports entries stop publishing and the daemon's outbound NAT disappears with it. The rule and the publishing are programmed together, so restoring publishing while keeping the rule requires a kernel that provides the raw table — the image update.

Keep reading

  • Troubleshooting

    Why Docker published ports fail after an edge PC reboot

    A container that reports running after a reboot has proved nothing about its published port. Treat unreachable ports as a boot-sequencing fault: probe each port from a client, follow the packets with iptables counters, then start the stack in dependency order instead of tuning the applications. Wait delays are installation-specific; readiness is proven per port.

    Edge computing and IIoT

  • Troubleshooting

    Fixing a Docker shared library error on an edge PC

    A container on an edge PC that exits with an error while loading shared libraries was built for a different controller firmware generation than the one installed. Pull the image revision rebuilt for your firmware, recreate the container, and verify with ldd, the linker cache and a restart-count check. Never symlink across major library versions: on a machine driving physical outputs, a mismatched library produces wrong I/O data instead of a clean error.

    Edge computing and IIoT

  • Troubleshooting

    Why an edge VM drops pings from some VLANs after boot

    When an edge virtual device answers pings during early boot and then goes unreachable from only some VLANs, suspect a Docker address overlap: the host's container networks reserve 172.16.0.0/12 by default. A corporate subnet inside that range loses its return path once the container bridges come up. Verify the overlap, then move the Docker pool to an unused range through the documented CLI onboarding method.

    Edge computing and IIoT