Docker Desktop 4.95.0 (WSL2): Read-only access to Engine network namespace

Hello everyone,

I’m looking for a supported, minimally privileged, read-only method to inspect the active Docker Engine’s Linux network namespace on Docker Desktop for Windows.

Environment:

  • Docker Desktop: 4.95.0

  • Docker Engine: 29.8.2

  • Backend: WSL2

  • Architecture: Linux/amd64

  • Docker context: desktop-linux

  • Host networking: Disabled

What I need

For a local security validation, I need to obtain evidence of:

  1. IPv4/IPv6 interfaces and addresses in the active Engine network namespace.

  2. All relevant Linux routing tables, not just the main table.

  3. FIB policy rules, including priorities, selectors and referenced routing tables.

  4. Reliable confirmation that the information comes from the actual Engine network namespace, rather than a container or an unrelated WSL namespace.

  5. Complete output without truncation.

Security constraints

I would prefer a method that does not require:

  • Privileged containers or CAP_SYS_ADMIN.

  • Enabling Docker Desktop host networking.

  • Changing Docker Desktop settings.

  • Starting additional containers or WSL distributions.

  • Collecting or uploading unrelated diagnostic information.

I understand that these constraints may make the request impossible with currently supported interfaces.

What I’ve investigated

Windows routing information and docker network inspect do not expose all internal Engine routing and policy-rule state.

Ordinary container-level or WSL networking information also cannot be assumed to represent the Engine’s active network namespace.

Docker’s automated support assistant indicated that no officially documented method matching these requirements is currently known.

My questions

  1. Is there an officially supported interface or documented diagnostic method for Docker Desktop 4.95.0 with the WSL2 backend that provides this information?

  2. If not, is there a lower-privilege alternative that can establish the correct namespace identity and collect the complete routing and FIB-rule evidence?

  3. Would such a method start helper processes, modify system state, or require elevated permissions?

  4. Is there an official Docker documentation reference or support channel that can clarify this?

I’m requesting guidance only at this stage, not instructions to modify the existing environment without reviewing the security implications.

Thank you for your help!

If you want to monitor the network, you will need some capabilities. You can check the list of capabilities that start with CAP_NET_ here: capabilities(7) - Linux manual page

That would also require using host network, but you would not need to enable the host network feature of Docker Desktop.

Depending on what "local security validation’ means in your case, you could also check if there is a Docker Desktop extension that you can use. Searching for “network”, I found these:

https://hub.docker.com/search?type=extension&q=network&page=1

Port Navigator might be useful, but I only loked at the screenshots, so I am not sure

https://hub.docker.com/extensions/portnavigator/port-navigator

Based on your “What I need” section, it would likely not be enough.

And deciding which namespace the request comes from, sounds like something that would require privileges you don’t want. For example something eBPF-based. But if you run somethign in Docker Desktop with host network (again, not Docker Desktop “fake” host network), you can monitor the docker bridge interfaces. Docker Desktop also has its own internal isolated environment with is own subnet, so I think you would only monitor the network of Docker Desktop, not other WSL distros.

Is this for a validation that checks if no containers send request to domains that they should not while developers are using Docker Desktop?

If it is for something else, like running something in a production-like environment or testing if that is safe to run, there is also Docker Sandboxes (sbx), which also has a GUI that shows every outgoing request which you can enable or disable one by one. That would not show which container the request came from, but I mention only, because it is very likely that my main answer does not solve your problem either.

I don’t know documentations you asked about. Regarding support channels, there are also Slack channels for Docker Desktop.: https://www.docker.com/community/get-involved/

Thank you for the detailed response. Your distinction between Docker Desktop’s Host Networking feature and the actual internal Engine host network namespace is particularly interesting.

To clarify our use case, we are not monitoring outbound requests or domain access.

We are performing a local security validation before creating an additional isolated Docker bridge network for an authentication test environment.

Our existing topology includes a private network connecting an authentication service to PostgreSQL. We want to add a separate observer network while ensuring that the new bridge subnet cannot conflict with existing routes or policy-routing rules inside the active Docker Engine’s Linux network namespace.

Our specific requirement is to obtain, before creating the new network:

  • All relevant IPv4 interface addresses and prefixes.

  • All IPv4 routing tables, including non-main tables.

  • FIB policy rules and their referenced routing tables.

  • Evidence that these results come from the active Engine-side network namespace rather than an ordinary container namespace.

  • Complete, non-truncated output.

We also need to preserve our existing stopped containers, networks, volumes and validation baseline.

Your suggestion about using the actual internal host network namespace without enabling Docker Desktop’s Host Networking feature sounds potentially relevant.

Could you clarify:

  1. What exact mechanism would provide access to that namespace on Docker Desktop for Windows with the WSL2 backend?

  2. Would it require --pid=host, --network=host, namespace entry, or additional Linux capabilities?

  3. Which specific CAP_NET_* capabilities would be necessary for reading routes and FIB rules, rather than modifying them?

  4. How could we verify that the collected information represents the Engine’s active network namespace?

  5. Is there documentation or a minimal, non-executed example we could review before deciding whether to authorize any diagnostics?

We are deliberately avoiding privileged diagnostic containers and environment changes until the access mechanism has undergone an independent security review.

Thanks again for your help!

I shared all I could say about the topic. You can test the capabilities which one is enough. I could only do the same. Regarding pid namespace sharing, I don’t know if you need that. I didn’t mention it in my previous post as we only discussed network.

Regarding network namespace, I am not sure what you mean. If you run a container in Docker Desktop, that container is already in the engine’s network namespace and host networking will use that.

Thank you very much :waving_hand: