Docker Compose - MacVlan can reach internet but bridge cannot

Hello,

I have a new docker (running on OMV) setup. I have several containers that I noticed would not be able to reach the internet (failed ping) when it’s left at its default bridge mode. However, when I set a new MacVLan, it works normally.

I have tried adding DNS onto /etc/docker/daemon.json as well as changing the MTU to be less than host’s ethernet.

Also, I have another duplicate OMV system running the same containers, nmcli shows that GENERAL.STATE connection is 100 (connected (externally)) vs GENERAL.STATE – for the affected system.

{
        "Name": "bridge",
        "Id": "eaa9de62f3e7e31de30b4c1a4f55eaaa5e75c29149f18988fa8a5e4233d73759",
        "Created": "2024-11-05T19:08:47.012832935-05:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.17.0.0/16",
                    "Gateway": "172.17.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {},
        "Options": {
            "com.docker.network.bridge.default_bridge": "true",
            "com.docker.network.bridge.enable_icc": "true",
            "com.docker.network.bridge.enable_ip_masquerade": "true",
            "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
            "com.docker.network.bridge.name": "docker0",
            "com.docker.network.driver.mtu": "1450"
        },
        "Labels": {}

Please share the output these commands:

docker run -it --rm nicolaka/netshoot ping 1.1.1.1
docker run -it --rm nicolaka/netshoot nslookup www.google.de

I re-installed Docker. Deleted the default bridge and created a new one with different subnet 172.30.0.0/16 and Gateway 172.30.0.1 and it is able to connect to the internet and DNS also working.

Not sure what’s conflicting.

Since you haven’t shared the outputs I asked for, I have no idea either :slight_smile: