Date : 12/01/2026 00:20 Statut : TERMINE Machine : prod-portainer (192.168.1.12)
Les containers Docker sur les reseaux bridge n'ont pas acces internet.
--network=host fonctionne# Depuis un container sur bridge
docker run --rm --network=bridge alpine wget -q https://google.com
# Resultat: FAIL - Host is unreachable
# Depuis un container sur host
docker run --rm --network=host alpine wget -q https://google.com
# Resultat: OK
cat /proc/sys/net/ipv4/ip_forward
# Resultat: 1 (active)
ip route show default
# default via 192.168.1.1 dev eth0 proto static
# default via 192.168.1.254 dev eth0 proto static
Note : Deux passerelles par defaut - potentiel conflit de routage.
iptables -t nat -L POSTROUTING -n -v
# MASQUERADE pour 172.20.0.0/16 (notifications) - present
# MASQUERADE pour 172.17.0.0/16 (docker0) - present
iptables -L FORWARD -n -v
# Chain FORWARD (policy DROP)
# -> DOCKER-USER
# -> DOCKER-FORWARD
# Depuis l'host (prod-portainer)
curl -4 https://ntfy.sh # OK (HTTP 200)
ping ntfy.sh # FAIL (ICMP bloque, normal)
Deux passerelles (192.168.1.1 et 192.168.1.254) peuvent causer des problemes de routage asymetrique.
La chaine DOCKER-USER est vide, ce qui devrait etre OK mais pourrait manquer des regles.
Le NAT/masquerading pourrait avoir des soucis avec le tracking de connexions.
3: ens19: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
Une interface reseau est DOWN - peut-etre liee au routage.
Tous les services notifications sont en --network=host :
Deux fichiers netplan en conflit :
/etc/netplan/50-cloud-init.yaml → gateway4: 192.168.1.1 (INEXISTANT)/etc/netplan/90-custom.yaml → via: 192.168.1.254 (FONCTIONNEL)Resultat : deux routes par defaut, dont une vers une passerelle morte.
ip neigh show | grep 192.168.1.1
# 192.168.1.1 dev eth0 FAILED
La passerelle 192.168.1.1 ne repond pas a l'ARP - elle n'existe pas sur le reseau.
echo 'network: {config: disabled}' | sudo tee /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
sudo rm /etc/netplan/50-cloud-init.yaml
network:
version: 2
ethernets:
eth0:
addresses:
- 192.168.1.12/24
routes:
- to: default
via: 192.168.1.254
nameservers:
addresses:
- 192.168.1.254
- 8.8.8.8
ens19:
optional: true
addresses:
- 10.10.10.12/24
sudo chmod 600 /etc/netplan/90-custom.yaml
sudo netplan apply
# Route unique fonctionnelle
ip route show default
# default via 192.168.1.254 dev eth0 proto static
# Test Docker bridge
docker run --rm --network=bridge alpine ping -c 2 8.8.8.8
# 2 packets transmitted, 2 packets received, 0% packet loss
Services remis sur bridge network apres correction du probleme de passerelle.
cd /mnt/stock_8to/33800-stack/docker/stacks/notifications
docker compose up -d
proxy_pass http://192.168.1.12:8080 # ntfy via bridge
curl -s -X POST "http://192.168.1.12:5300/api/notify/push" \
-H "Content-Type: application/json" \
-d '{"title": "TEST", "body": "OK"}'
# {"success":true,"log_id":1,"storage":"memory"}