What Did That Container Talk To Last Night?

What Did That Container Talk To Last Night?

Published: November 29, 2026

The small app was never the target. It was the way in.

Many of us run backends in Docker containers on one server, each app in its own box. It feels separated. On a standard Docker setup a container can very likely open a connection to two places: the server it runs on, and anywhere on the internet. It depends on your platform and how it was set up, so check yours.

Now suppose one small app gets taken over through a bug. A forgotten side project, an old library. From inside that container the attacker can try to:

  1. Reach the deploy panel running on the same server. That panel holds the secrets of every app and can deploy or stop any of them.
  2. Reach the cloud metadata address, which can hand out credentials.
  3. Send your data out to any server on the internet.
  4. Use your server as a hopping point: send spam, or attack someone else from your address.

This has not happened to me. It came up in a security review I did with Claude, and I closed it. My setup is Coolify on a Hetzner server. Two things I did, one for each place.

First, the server: app containers cannot call the server they run on

A backend serving an API has no reason to open a connection to its own host. So new connections from app containers to the host are refused. A couple do need it, like the container that monitors the server. Those are on a short written list of exceptions.

Second, the internet: I record where each container goes

Internet access cannot simply be switched off for a container. Many apps need it to do their job. My Yahoo Finance backend has to call Yahoo. An AI app has to call its model provider.

So I record it. For a normal app the list of destinations is short and hardly changes. Its database, one or two APIs, a package registry at build time.

A destination never seen before trips a tripwire, which alerts the AI security team member I keep on watch around the clock. If it looks wrong, the incident steps start: isolate the app first, keep the logs, then investigate.

Two cautions from doing this

Check which firewall controls your container ports. Docker's own documentation says that a port you publish from a container can stay reachable even when the ufw firewall on the server says it is closed. On my setup the Hetzner cloud firewall in front of the server is the one that decides. Yours may differ, so test it from outside.

And test from inside the container. Try to reach the host's panel port from there. It must fail. A firewall listing can look right and still be out of date after a deploy.

But what if the one inside is a very smart AI agent, and going by the news some of them are expert escapers... well just hope you have been nice to it.

This is not a full list for container security. These are two gaps I found on my own server and closed.

This is item 9.6 on the security checklist: tigzig.com/security


Working on something similar? How I work covers the rates, the availability and what I take on.