Comment on Help with Getting My Reverse Proxy to Forward the Correct IP Address

<- View Parent
lemmyvore@feddit.nl ⁨15⁩ ⁨hours⁩ ago

Yeah that’s because most people are under the impression that Docker only allocates 172. addresses for its bridge network. I was under that impression too.

Turns out it also allocates 192.168 addresses.

Does it overlap my LAN? Is 192.168.65.X not distinguishable from my defined subnets with a 24-bit mask, now that I know where they’re coming from?

The problem is that the default says 192.168.0.0/16, so it can also generate overlapping addresses. The fact it generated a 192.168.65.x address instead of an 192.168.1.x address was pure luck.

Somehow all of the tutorials I’ve found in the past months to set up services behind a reverse proxy never mentioned any of these gotchas with Docker and networks.

The common-sense assumption is that you will adjust your Docker daemon settings so that you prevent overlap with your LAN. (Also, I expect lots of tutorials aren’t that high quality to begin with.)

If you edit daemon.json like I explained and explicitly only put 172. ranges in there you should be safe from overlaps in the future.

original
Sort:hotnewtop