Docker is breaking my routing table. Bug or misconfiguration? #47447
Closed
realmilsky
started this conversation in
General
Replies: 1 comment
-
My apologies. Seems I may have reported this in the wrong place. Never trust Co-Pilot. :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Docker is consistently breaking the routing table on my Debian 12 machine by adding default routes that point to one of it's virtual interfaces. This causes me to lose access to anything beyond my local network.
The broken routing table:
ip route
0.0.0.0 dev veth5fd70d9 scope link
0.0.0.0 dev veth4b5118f scope link
default dev veth5fd70d9 scope link
default dev veth4b5118f scope link
default via 192.168.1.1 dev enp13s0
default via 192.168.1.1 dev enp13s0 proto static metric 100
169.254.0.0/16 dev veth4b5118f proto kernel scope link src 169.254.162.19
169.254.0.0/16 dev veth5fd70d9 proto kernel scope link src 169.254.15.92
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1
172.18.0.0/16 dev br-39a835ab55a4 proto kernel scope link src 172.18.0.1 linkdown
172.19.0.0/16 dev br-e98dfd9bc8fd proto kernel scope link src 172.19.0.1
172.20.0.0/16 dev br-99157cc563ca proto kernel scope link src 172.20.0.1 linkdown
172.21.0.0/16 dev br-dbb0ea5de7a4 proto kernel scope link src 172.21.0.1 linkdown
172.22.0.0/16 dev br-383428225a9a proto kernel scope link src 172.22.0.1 linkdown
172.25.0.0/16 dev br-1458e368a5bf proto kernel scope link src 172.25.0.1 linkdown
192.168.1.0/24 dev enp13s0 proto kernel scope link src 192.168.1.179 metric 100
192.168.1.1 dev enp13s0 scope link
My bridge configuration:
docker network inspect bridge
[
{
"Name": "bridge",
"Id": "538dbd495b7f5465bdfb96f7d1b35969fc95ede6ee13a6a755b67882b97cedb3",
"Created": "2024-02-25T21:16:26.156207677-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": {
"c334d55d6700da2a979588659c63a35008828029dafe576c2676d11119f59595": {
"Name": "jolly_maxwell",
"EndpointID": "497252cbbb2154edb31f4d5dd286ea1074abce50469c1afa96d170e7ebaa3dc6",
"MacAddress": "02:42:ac:11:00:02",
"IPv4Address": "172.17.0.2/16",
"IPv6Address": ""
}
},
"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": "1500"
},
"Labels": {}
}
]
Is there a way to tell it to NEVER overwrite the default entry in the routing table? I tried adding the following to /etc/docker/daemon.json but then Docker refuses to start at all.
{
"bip":"172.18.0.1/24",
"default-address-pools":[
{"base":"172.19.0.0/16","size":24}
]
}
Beta Was this translation helpful? Give feedback.
All reactions