Questions tagged as ['docker-networking']

Score: 0
Boris avatar
ebtables not working in docker
us flag

Hi I am trying to run ebtables within docker however none of the ebtables rules are being hit.

For example - pay attention that counters are not increased though ARP is sent and succeeds

[root@injector /]# ebtables -A OUTPUT -p ARP -j ACCEPT
[root@injector /]# ebtables -Lc  --Lc --Lx
Bridge table: filter

Bridge chain: INPUT, entries: 0, policy: ACCEPT

Bridge chain: FORWARD, entries: 0, policy: ACCEPT

Score: 0
marc avatar
Distribute IPs from DHCP server in host network to docker containers
cn flag

I am running several services in docker containers for my homelab, and I need them to be accessible from their own distinct IPs. My host system is running debian "bullseye".

From the docker documentation, it seems natural to use a macvlan network in bridge mode, and the default way is working correctly for me.

However, I try to use a minimum of manual IPs in my network, and instead try to have my ...

Score: 0
Docker isn't fowarding port to redis
ru flag

I'm trying to run redis in a docker container on AmazonLinux, and I can't for the life of me get it to forward the port. It starts as it should and appears to be working, but there is no process listening on 6379 on the host box, as one would expect. What should I do?

Here is uname -a:

Linux <host name omitted>.internal 5.4.176-91.338.amzn2.x86_64 #1 SMP <start time omitted> x86_64 x86_ ...
Score: 0
Danil avatar
Link docker container to a specific network interface
dz flag

I am trying to start OpenVPN server for accessing resources on VPC network.

I have two network interfaces, public eth0 and VPC eth1. And an OpenVPN working in a docker container. But I want to use this VPN only to access resources over eth1 interface. And make it impossible to access internet over that VPN. So I want to map OpenVPN inbound port 1194/udp to eth0 in order to access VPN server. And  ...

Score: 0
transient_loop avatar
Still can't connect from my grafana docker container to prometheus
ru flag

...after having followed a bunch of tutorials, e.g.

I started the grafana container with:

%box docker run -d -p 3000:3000 --add-host=host.docker.internal:host-gateway --name grafana grafana/grafana-oss

But when I try to reach the prometheus instance from the grafana container it doesn't wo ...

Score: 0
407 Proxy Authentication Error When Running Python in Docker but *Not* when running from local environment
cn flag

I'm having a peculiar issue. When I make requests running my script on my local machine and go through the (paid and authenticated) proxy, it runs just fine. However, when I containerize the application and attempt to run again, I get the following error:

File "/usr/local/lib/python3.7/site-packages/requests/", line 513, in send
    raise ProxyError(e, request=request)
requests.exception ...
Score: 0
Bobys avatar
Set MacVLAN in Portainer to get IP from DHCP server
ru flag

I have a Portainer VM with 3 interfaces attached (eth0-eth2). I would like the containers to request IP from the DHCP Server that is located on each interface at x.x.x.1.

Lets take as an example eth0:

The subnet of this interface is 172.16.0/27 and I would like my containers get in IP in the range of Under Portainer networks, I added another network with the following settings:

  • Na ...
Score: 0
ddrjm avatar
docker-compose with multiple networks
cn flag

I want to install NextCloud ( via docker-compose.

After analyzing the docker-compose structure, I see that this image is composed of two services (app and db).

Currently, in a server, I have all docker based services running in a macvlan network so that they are visible to the rest of the devices in the network

How can I tweak the NextCloud docker-compose file in ord ...

Score: 0
Desultory avatar
Unable to use Docker DNS with nftables
pw flag

I have a bind9 DNS container running on, which is on the docker network "servers" on the subnet this works fine and if I run: nslookup

I get the output:


Non-authoritative answer:

When I run the same command in a docker container: docker ru ...

Score: 0
Mohammed Noureldin avatar
How to add a network interface to Docker Overlay network?
pe flag

How can I add a network interface (either a physical like eth0 or virtual like tap) to Docker Overlay network overlaynet? So that my interface becomes part of the layer 2 network with the other containers in that Overlay network?

When I used to deploy applications on a single Docker host, I just used to do the following to add a network interface to a Docker bridge network:

ip link set $my_network_inte ...
Score: 1
Docker creates additional bridge in wrong IP range
sh flag

I followed the answers here and changed the daemon.json to:

  "bip": "",
  "default-address-pools": [
      { "base":"","size":24 },
      { "base":"","size":24 }

as I wanted to change the IP range used by the docker networking. However, when I start there is still a bridge created belonging to the IP range I wanted to move away from:

8: br-6c870af107ba: &l ...
Score: 0
Alex Weitz avatar
Can't curl Docker Containers
kr flag

I'm trying to setup docker on a company VM on Ubuntu 20.04.
At first I couldn't even start the service because it seems there was a conflict with the pre-existing routes. If I run the route command I get this:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         UG    20     0        0 eno3np0.1169         ...
Score: 2
Docker Swarm over IPSec VTI (Unifi site-to-site)
it flag

I have setup a Docker Swarm using 3 servers;

Master node
Home - local IP

Worker node 1
Remote - local IP

Worker node 2
Remote - local IP

Both sites have a Unifi gateway (USG Pro/USG) and I've setup a site-to-site connection between them (auto settings, IPSec VTI)

I was able to add the 2 nodes using join tokens from the master since both worker nodes can access  ...

Score: 0
ppenguin avatar
strange NAT issues with pfSense to vagrant VM
tr flag

This one has got me confused:

I have a pfSense firewall (let's call it pfs) and behind it several servers. I NAT several services from my public IP to different servers on the LAN without any issues.

On one of the servers (let's call it s1) I'm running a vagrant (with libvirt) VM (let's call it v1) with a public network configured, which gets IP via pfss DHCP server.

Now I configure a simpl ...

Score: 0
Max.-F. avatar
How to setup firewall rules for rootless docker
us flag

I am new with docker and have installed docker in rootless mode, which works just fine. The problem is that with this the guides for firewall with docker does not work (I have no network-interface 'docker0' nor a iptables-chain 'DOCKER-USER') and I could not find a site which explains how to setup a firewall for docker-rootless.

My specific use-case is to control outgoing traffic from the contain ...

Score: 6
Potatoes avatar
Docker on Ubuntu Server (Rasberry Pi) failed to create endpoint on network bridge, operation not supported
us flag

I am using Ubuntu 21.10 on a Rasberry Pi 4 (aarch64) and when I try to run a Docker (using version 20.10.7) container it returns the following error message:

docker: Error response from daemon: failed to create endpoint goofy_hypatia on network bridge: failed to add the host (veth3da4a58) <=> sandbox (veth987ce17) pair interfaces: operation not supported.
ERRO[0000] error waiting for containe ...
Score: 0
Vincent Chalmel avatar
API requests delayed among docker swarm cluster's nodes & containers
cn flag

In the process of migrating our docker infrastructure to a docker swarm cluster we are experiencing performance issues when containerized APIs are calling outside ressources (e.g. elasticsearch queries to elastic cloud, or other API's on MS Azure, etc.)

Our first investigations have shown that 1) queries from the hosts are not affected, only traffic from containers is delayed, and 2) the first qu ...

Score: 1
Eric Stdlib avatar
Docker expose a port of a container but restrict network access
tl flag

I have a server A, and it runs a container B (say an SSH server). I want to allow people doing some computation on B that does not access the network.

Using docker run --publish=${MY_PORT}:22 ..., I expose container B's port to allow people to connect into B. This way people can ssh into B using A's ${MY_PORT} port. However, people can initiate TCP connections to other servers (e.g., so t ...

Score: 0
Mikaelblomkvistsson avatar
Create UDP forwarders imitating multiple network elements that use the same port
de flag


  • I have a containerized service that sends UDP packets to a list of network elements (3rd party syslog sink servers).
  • Each target network element is specified by IP address, its port number is constant, the same for each node.

I need to create a simple test environment - like in the graph below. The main service emits syslog messages, on the graph it's named PRODUCER CONTAINER.


Score: 0
j0hny avatar
Iptables and docker - disable remote access to container while retaining host and containers communiation via proxy
us flag

recently, I have started to migrate a webserver with several apps to new server and bundling every app in a docker container. My current setup consist of nginx for reverse proxy and database servers running on the server itself and all web applications running in their own docker containers.

I am now trying to secure the webserver using iptables, like I was doing for many years before. I need to  ...

Score: 2
Why is firewalld allowing public traffic to my non-public ports, bound to Docker containers?
de flag

I'm trying to implement a pretty simple firewall in Fedora, where the public internet can access SSH, HTTP, HTTPS and Cockpit, but nothing else. Meanwhile, the servers run microservices via Docker that can talk to each other on ports 8000-8999.

network diagram

I set this up on a fresh Fedora Server install with the following commands:

firewall-cmd --zone=public --add-service=cockpit
firewall-cmd --zone=public --add-se ...
Score: 0
boatcoder avatar
Nginx can't be reached inside the docker container. What have I left out?
us flag

I've run out of ideas as to why I can't connect to this nginx inside or outside of the docker. I can understand that networking might cause a problem outside the machine, but even inside the docker nginx is not responding even though you can see it running and listening (inside the docker). Outside the docker, maybe the port isn't mapping thru but it seems to be configured such that it should.

Score: 2
Boris avatar
Docker compose - disable default gateway route
us flag

Is it possible to prevent docker from defining default route when using docker-compose yaml file?

If my docker-compose.yaml defines network ipam with default driver and any subnet, seams like docker (or docker compose) automatically assigns default route to the routing table of the docker that is attached to this network). Is there any way to disable it?

Score: 1
docker - create two container got two different network id instead of using default bridge network
uz flag

My goal was, that Jenkins container will "talk" with Ansible container in order to create Jenkins file for Jenkins pipeline.

I was expected that those two container will "join" to bridge network and get 2 IP addresses of the same network id, but instead additional two networks were created, and each container got IP of different Network id.

Also, expected that those two container will have acces ...

Score: 1
Boris avatar
Run docker in pre-exisiting network namespaces
us flag

I need to run a docker in a pre-existing namespace, which wasn't created by docker infrastructure. Is it possible to do ? I am aware of reusing another container option but as I mentioned the pre-existing ns wasn't created by one ( so answer to this question is irrelevant). I need solution for Linux.

Score: 2
What routing algorithm does the docker mesh use?
vu flag

We want to know what algorithm the Docker mesh uses to route requests to containers. Here's why:

We deploy our applications to self-hosted docker swarms. We use the docker routing mesh to direct traffic to the individual nodes, like this:

  • internet ->
  • firewall ->
  • load director (nginx) ->
  • nginx "least connection" routing to three swarm managers ->
  • docker mesh ->
  • Any of the six app con ...
Score: 0
Folshost avatar
Create a containerized reverse proxy with multiple sites on a separate IP Address
cn flag

I administer a small cluster which has several different services running, including grafana monitoring as a container, cloud file storage as a container (nextcloud), and a FreeIPA server on bare metal. I want to put the cloud storage service behind a reverse proxy ( to enable https, but I can't use port 80 for this, because it's already being used by the IP ...

Score: 0
Rohini avatar
Does bridge networking mode in ECS limit number of tasks on container instance
gr flag

I have an EC2 registered to ECS cluster on which tasks can run. Originally I chose the awsvpc network mode so every task(container) had it's own ENI(IP). But I ran into limitation at

ENI Limit is 3 for m5.large instance type

So I changed the network mode to bridge Will using the bridge network limit the tasks to 10 be ...

Score: 0
Dannyboy avatar
Remote mysql server in docker container - access using macvlan and wireguard?
co flag

Situation: Several VPS servers around the US connected to my laptop via wireguard mesh network. For wireguard mesh network Im using tool called innernet (

So basically its like my laptop and vps servers are on same internal network.

VPS ip    =
laptop ip =

Looks like VPS and laptop has this virtual interface defined (not sure if this matters): ...

Score: 1
Gooze avatar
Nextcloud can't connect to Collabora
cn flag

i've setup a docker host, and wanted to setup nextcloud with collabora-office. But it simply does not find the collabora host. my compose file is the following:

version: '3.2'

    image: mariadb:10.5
    restart: always
      - db:/var/lib/mysql
      - MYSQL_DATABASE=xxx-nextcloud
      - MYSQL_USER=xxxnc
      - MYSQL_PASSWORD=evilcorp
      - MARIAD ...