Selaa lähdekoodia

contrib/sni-router: document OpenWrt + podman-compose network workaround

OpenWrt firewall zones are bound to interface names. With bare podman
you can pin the static podman0 bridge into a zone, but podman-compose
creates a project-scoped network and netavark spawns a fresh bridge
(podman1, podman2, ...) per project — with no firewall rules — so
containers lose outbound access.

Mark the default network as external/name=podman to attach to the
router-managed podman0 instead.

Background: #513.
pull/523/head
Alexey Dolotov 6 päivää sitten
vanhempi
commit
93db89b165
1 muutettua tiedostoa jossa 22 lisäystä ja 0 poistoa
  1. 22
    0
      contrib/sni-router/README.md

+ 22
- 0
contrib/sni-router/README.md Näytä tiedosto

@@ -114,6 +114,28 @@ domain's DNS A/AAAA record points to this server before starting.
114 114
            └─────────┘  └─────────┘
115 115
 ```
116 116
 
117
+## OpenWrt + podman-compose
118
+
119
+OpenWrt's firewall zones are bound to interface *names*.  With bare
120
+`podman` you pin the static `podman0` bridge into a zone and you're
121
+done — but `podman-compose up` creates a project-scoped network, and
122
+netavark spawns a *new* bridge for it (`podman1`, `podman2`, …) that
123
+has no firewall rules, so containers lose outbound access.
124
+
125
+Reuse the pre-configured `podman0` by adding to this compose file:
126
+
127
+```yaml
128
+networks:
129
+  default:
130
+    external: true
131
+    name: podman
132
+```
133
+
134
+That tells compose to attach to the router-managed network instead of
135
+spinning up a new one.  Background:
136
+[discussion #513](https://github.com/9seconds/mtg/discussions/513)
137
+and the [OpenWrt forum thread](https://forum.openwrt.org/t/podman-compose-dontt-have-network-access/250230).
138
+
117 139
 ## Files
118 140
 
119 141
 | File | Purpose |

Loading…
Peruuta
Tallenna