Connection between host and container with own ip


I use docker on a debian 10 host with IP and i use containers:

  • with own ip like - 30 (I use a network with macvlan driver)
  • without ip like or

Now I have a problem with connection between the host and my container with 192.168.10.* ip. F.e. I can ping the container with ip from other hosts like but not from

I found information about routing between host and containers. But I’ve still no clue how to solve this.

#> cat /etc/network/interfaces
auto lo
iface lo inet loopback

iface eno1 inet manual

auto vmbr0
iface vmbr0 inet static
    bridge_ports eno1
    bridge_stp off
    bridge_fd 0

Don’t wounder about the vmbr0 device. On this machine is also running proxmox.

Thank you for you attention.

You might want to check this thread:

Thank you for the answer. In this case, what is the best way to create a container with his own ip (different from the host-ip) which can be accessed from other devices in my network? is this not the default use-case for docker?

The default use case is to use overlay or bridged networks and publish ports.

Containers interacting with each orther need to be in the same docker network. Access from outside is usualy done using load balancers that listen on a subdomain and forward the traffic to publised ports.

Usualy people asking for macvlan are trying to treat docker containers like vms…

At the end your use case dictates what is required. The earlier posted link has a link to a blog post that discusses how the setup needs to look like in order to permit communication between the docker node and containers.

You might want to share how you create your macvlan network. Be sure to use a subnet CIDR inside the range CIDR that is excluded from the LAN’s dhcp server to prevent ip collisions.