You are not logged in.

#1 2026-11-29 07:16:45

Santo C01
Member
Registered: 2026-03-02
Posts: 31

Docker network isolation using Unix sockets

Hi everyone,

I'm working on isolating an AI agent inside a Docker container while allowing it to access only approved external domains.

I'm considering two approaches:

- An internal Docker bridge with dedicated firewall rules and an HTTP proxy.
- Using `--network=none` with a bind-mounted Unix socket, Socat and Squid to provide controlled proxy access through the container's loopback interface.

My objective is to achieve strong network isolation while keeping modifications to the host system and its existing firewall configuration to a minimum.

Has anyone implemented the second approach? Are there any disadvantages from a security, reliability or maintenance perspective?

Is there a simpler or more secure approach you would recommend?

Thanks in advance.

Last edited by Santo C01 (2026-11-29 07:17:14)

Offline

#2 Yesterday 22:05:44

AzharAbbasPK
Member
Registered: 2026-11-28
Posts: 5

Re: Docker network isolation using Unix sockets

I haven't run the socket version myself, but --network=none plus a bind-mounted socket is a decent idea since there is no network stack to leak from. Main downside is more moving parts to maintain, and the proxy then becomes the one thing you have to trust, so allowlist the domains there and log denied requests.

Offline

Board footer

Powered by FluxBB