---
description: Understand how networking works on Docker Desktop and see the known limitations
keywords: networking, docker desktop, proxy, vpn, Linux, Mac, Windows
title: Explore networking features on Docker Desktop
linkTitle: Networking
aliases:
- /desktop/linux/networking/
- /docker-for-mac/networking/
- /mackit/networking/
- /desktop/mac/networking/
- /docker-for-win/networking/
- /docker-for-windows/networking/
- /desktop/windows/networking/
- /desktop/networking/
weight: 30
---
Docker Desktop includes built-in networking capabilities to help you connect containers with services on your host, across containers, or through proxies and VPNs.
## Networking features for all platforms
### VPN Passthrough
Docker Desktop networking can work when attached to a VPN. To do this,
Docker Desktop intercepts traffic from the containers and injects it into
the host as if it originated from the Docker application.
### Port mapping
When you run a container with the `-p` argument, for example:
```console
$ docker run -p 80:80 -d nginx
```
Docker Desktop makes whatever is running on port `80` in the container, in
this case, `nginx`, available on port `80` of `localhost`. In this example, the
host and container ports are the same.
To avoid conflicts with services already using port `80` on the host:
```console
$ docker run -p 8000:80 -d nginx
```
Now connections to `localhost:8000` are sent to port `80` in the container.
> [!TIP]
>
> The syntax for `-p` is `HOST_PORT:CLIENT_PORT`.
### HTTP/HTTPS Proxy support
See [Proxies](/manuals/desktop/settings-and-maintenance/settings.md#proxies)
### SOCKS5 proxy support
{{< summary-bar feature_name="SOCKS5 proxy support" >}}
SOCKS (Socket Secure) is a protocol that facilitates the routing of network packets between a client and a server through a proxy server. It provides a way to enhance privacy, security, and network performance for users and applications.
You can enable SOCKS proxy support to allow outgoing requests, such as pulling images, and access Linux container backend IPs from the host.
To enable and set up SOCKS proxy support:
1. Navigate to the **Resources** tab in **Settings**.
2. From the dropdown menu select **Proxies**.
3. Switch on the **Manual proxy configuration** toggle.
4. In the **Secure Web Server HTTPS** box, paste your `socks5://host:port` URL.
## Networking mode and DNS behaviour for Mac and Windows
With Docker Desktop version 4.42 and later, you can customize how Docker handles container networking and DNS resolution to better support a range of environments — from IPv4-only to dual-stack and IPv6-only systems. These settings help prevent timeouts and connectivity issues caused by incompatible or misconfigured host networks.
> [!NOTE]
>
> These settings can be overridden on a per-network basis using CLI flags or Compose file options.
### Default networking mode
Choose the default IP protocol used when Docker creates new networks. This allows you to align Docker with your host’s network capabilities or organizational requirements, such as enforcing IPv6-only access.
The options available are:
- **Dual IPv4/IPv6** (Default): Supports both IPv4 and IPv6. Most flexible and ideal for environments with dual-stack networking.
- **IPv4 only**: Only IPv4 addresses are used. Use this if your host or network does not support IPv6.
- **IPv6 only**: Only IPv6 addresses are used. Best for environments transitioning to or enforcing IPv6-only connectivity.
> [!NOTE]
>
> This setting can be overridden on a per-network basis using CLI flags or Compose file options.
### DNS resolution behavior
Control how Docker filters DNS records returned to containers, improving reliability in environments where only IPv4 or IPv6 is supported. This setting is especially useful for preventing apps from trying to connect using IP families that aren't actually available, which can cause avoidable delays or failures.
Depending on your selected network mode, the options available are: