Peering with a family site: export a shared LB pool over BGP/WireGuard #168

Open
opened 2026-11-20 02:42:56 +00:00 by ginjiruu · 1 comment
Owner

Design for peering the caosh network with my brother's site, so services I choose are reachable from his network and nothing else is. Not scheduled; written down 2026-11-19 so it is ready when we talk.

Model: export by LB pool

A Service is exported when its LoadBalancer address comes from a shared pool, not merely because it is a LoadBalancer: internal apps use LB addresses too.

  1. Shared pool. A Cilium LB IP pool, e.g. 10.30.101.0/24 plus a ULA /64 from fdd5:c8ef:2fa0::/48, selected by a Service label such as lbipam.animeteamspeak.moe/pool: shared. Labelling a Service puts its address in that pool; everything else stays in the existing pools.
  2. Routers export only that pool. eBGP to his routers over a native WireGuard link (ADR-0008 range 200, /31 + /127 per link). The output filter on that session announces the shared pool's aggregate (not per-service /32s) and nothing else. Today every session rejects all output (#125), so this is an explicit allow-list. One stable route for his side; the firewall decides what is reachable inside it.
  3. Inbound filter. Accept only his assigned prefixes; never accept our own ranges; max-prefix limit on the session.
  4. Peer zone. His tunnel is its own firewall zone (the TODO in modules/router/firewall.tf, #79), allowed to the shared pool on listed ports only. This is the security boundary.
  5. Names. A third external-dns label (beside dns.animeteamspeak.moe/public and /internal) writes shared services into a peer-visible zone; his resolver conditionally forwards it to our ns1 over the tunnel. Earlier mesh-naming notes reserve share.int for this.
  6. No overlaps. ADR-0008's random /16 per site and per-site ULA keep the two networks from colliding, provided his side follows the same scheme.

Alternative

NetBird (ADR-0008, "Our own sites") can carry the shared pool as a network route instead of BGP: simpler for him, less routing control here.

Open questions

  • His ASN (private, 64512-65534, distinct from 64512/64515/64516) and address plan.
  • Which services go shared first.
  • Whether DNS for shared names lives under share.int or a per-peer zone.

Related: #79 (peer zones), #125 (BGP filters), ADR-0008.

Design for peering the caosh network with my brother's site, so services I choose are reachable from his network and nothing else is. Not scheduled; written down 2026-11-19 so it is ready when we talk. ## Model: export by LB pool A Service is exported when its LoadBalancer address comes from a **shared pool**, not merely because it is a LoadBalancer: internal apps use LB addresses too. 1. **Shared pool.** A Cilium LB IP pool, e.g. `10.30.101.0/24` plus a ULA `/64` from `fdd5:c8ef:2fa0::/48`, selected by a Service label such as `lbipam.animeteamspeak.moe/pool: shared`. Labelling a Service puts its address in that pool; everything else stays in the existing pools. 2. **Routers export only that pool.** eBGP to his routers over a native WireGuard link (ADR-0008 range 200, /31 + /127 per link). The output filter on that session announces the shared pool's **aggregate** (not per-service /32s) and nothing else. Today every session rejects all output (#125), so this is an explicit allow-list. One stable route for his side; the firewall decides what is reachable inside it. 3. **Inbound filter.** Accept only his assigned prefixes; never accept our own ranges; max-prefix limit on the session. 4. **Peer zone.** His tunnel is its own firewall zone (the TODO in `modules/router/firewall.tf`, #79), allowed to the shared pool on listed ports only. This is the security boundary. 5. **Names.** A third external-dns label (beside `dns.animeteamspeak.moe/public` and `/internal`) writes shared services into a peer-visible zone; his resolver conditionally forwards it to our `ns1` over the tunnel. Earlier mesh-naming notes reserve `share.int` for this. 6. **No overlaps.** ADR-0008's random /16 per site and per-site ULA keep the two networks from colliding, provided his side follows the same scheme. ## Alternative NetBird (ADR-0008, "Our own sites") can carry the shared pool as a network route instead of BGP: simpler for him, less routing control here. ## Open questions - His ASN (private, 64512-65534, distinct from 64512/64515/64516) and address plan. - Which services go shared first. - Whether DNS for shared names lives under `share.int` or a per-peer zone. Related: #79 (peer zones), #125 (BGP filters), ADR-0008.
Author
Owner

DNS between the sites

Options, best first:

  1. Conditional forwarding on his router (recommended). Only the shared zone, e.g. share.int.animeteamspeak.moe, is forwarded to our ns1 (10.30.100.11) over the tunnel; everything else keeps using his ISP or public resolvers. RouterOS 7 does it with one static type=FWD entry, and OpenWrt (dnsmasq server=/zone/ip) does too. If the tunnel or this site is down, only our shared names stop resolving; his household internet is unaffected. The peering already needs a router on his side that speaks BGP over WireGuard, so the same box does this: nothing extra for him to run or learn.
  2. He uses our resolvers for everything. Simplest on paper: his DHCP hands out our recursor (10.30.100.53) over the tunnel. But all of his DNS then depends on our site and the tunnel (outage = his whole house loses DNS), we see every query his household makes, and adding a public resolver as a "backup" does not work: clients pick DHCP resolvers in no reliable order, so shared names would fail at random. Acceptable only if his router cannot do option 1.
  3. A secondary of the shared zone on his side (AXFR over the tunnel with TSIG): survives a tunnel outage for lookups, but needs a server he runs. Overkill for a few names.
  4. Shared names in public DNS pointing at private addresses: no setup for him, but it publishes our internal layout, and some resolvers drop private answers (rebinding protection). No.

Either way, the reverse holds for his names: our recursor gets a forward zone for his zone to his resolver, and the peer firewall zone allows his resolver (and only it) to reach ns1 on 53.

For a non-technical peer the practical answer is option 1 with us managing his router: he never touches DNS, and his internet does not depend on us.

## DNS between the sites Options, best first: 1. **Conditional forwarding on his router (recommended).** Only the shared zone, e.g. `share.int.animeteamspeak.moe`, is forwarded to our `ns1` (10.30.100.11) over the tunnel; everything else keeps using his ISP or public resolvers. RouterOS 7 does it with one static `type=FWD` entry, and OpenWrt (dnsmasq `server=/zone/ip`) does too. If the tunnel or this site is down, only our shared names stop resolving; his household internet is unaffected. The peering already needs a router on his side that speaks BGP over WireGuard, so the same box does this: nothing extra for him to run or learn. 2. **He uses our resolvers for everything.** Simplest on paper: his DHCP hands out our recursor (10.30.100.53) over the tunnel. But all of his DNS then depends on our site and the tunnel (outage = his whole house loses DNS), we see every query his household makes, and adding a public resolver as a "backup" does not work: clients pick DHCP resolvers in no reliable order, so shared names would fail at random. Acceptable only if his router cannot do option 1. 3. **A secondary of the shared zone on his side** (AXFR over the tunnel with TSIG): survives a tunnel outage for lookups, but needs a server he runs. Overkill for a few names. 4. **Shared names in public DNS pointing at private addresses:** no setup for him, but it publishes our internal layout, and some resolvers drop private answers (rebinding protection). No. Either way, the reverse holds for his names: our recursor gets a forward zone for his zone to his resolver, and the peer firewall zone allows his resolver (and only it) to reach `ns1` on 53. For a non-technical peer the practical answer is option 1 with us managing his router: he never touches DNS, and his internet does not depend on us.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lab/iac#168
No description provided.