Short answer: if your captive-portal login page never loads and the gateway is unreachable while the interface says Connected, a Docker bridge is probably squatting on the same subnet as the gateway. Linux prefers local routes, so packets go into the virtual bridge and never leave the machine. Confirm with ip route get <gateway-ip>, if it says dev docker0 instead of your ethernet interface, that's it. Move Docker to an uncommon range in /etc/docker/daemon.json:
{ "default-address-pools": [{ "base": "10.200.0.0/16", "size": 24 }] }Then sudo systemctl restart docker. Full diagnosis below.
SymptomsCopied!
When connecting to campus ethernet, a login page (e.g. gateway.iitj.ac.in) normally opens for authentication.
On Ubuntu the interface shows Connected, but:
- No websites load (even
google.com) - Login page never appears
- Browser shows
ERR_ADDRESS_UNREACHABLE - Pinging the gateway returns
Destination Host Unreachable
Root CauseCopied!
Linux always prefers local routes over default routes. If Docker/VPN creates a bridge using the same subnet as your campus gateway, the OS thinks the gateway is local and sends packets into that virtual bridge instead of the real network.
Result: No packets reach the gateway to captive portal never loads.
DiagnosisCopied!
First, check where the gateway IP is being routed:
getent hosts gateway.iitj.ac.in
ip route get <gateway-ip>If the route shows something like:
dev docker0
dev br-xxxx
dev tailscale0instead of your ethernet interface (e.g., enpXsY), then traffic is being captured by a local virtual network instead of the real gateway.
Common CausesCopied!
- Docker default bridge (
172.17.0.0/16) - Docker Compose networks
- Old/stale Docker bridges
- VPNs (Tailscale, etc.) adding routing rules
- Any local subnet overlapping the campus network
Example of a broken route:
172.17.0.3 dev docker0 src 172.17.0.1Solution: Move Docker Away from Common Private RangesCopied!
Step 1: Edit Docker daemon configCopied!
sudo nano /etc/docker/daemon.jsonUse a safe, uncommon subnet:
{
"default-address-pools": [
{
"base": "10.200.0.0/16",
"size": 24
}
]
}Step 2: Restart DockerCopied!
sudo systemctl restart dockerStep 3: Recreate Compose networks (important)Copied!
Old networks keep old subnets. Remove them:
docker compose down
docker network prune -fThen start again:
docker compose up -dStep 4: Delete any stale bridges (if still present)Copied!
ip a | grep br-
sudo ip link delete br-xxxxVerificationCopied!
Check that the route now points to your ethernet interface:
ip route get <gateway-ip>It should now show:
via <ethernet-gateway> dev enpXsYTakeawayCopied!
If an intranet/login page shows unreachable on Ubuntu:
- Resolve the gateway IP
- Run
ip route get <ip> - Check for Docker/VPN/bridge conflicts