Skip to content
christiaangoossensPublic

About

IPv4 Border Relay for IPv6-only networks (HTTP, TLS & SIIT/full IP forward)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

ipv4-br

IPv4 Border Relay for IPv6-only networks: a Linux daemon that gives an IPv6-only network or data center an IPv4 front door at the edge (RFC 6144 Scenario 2, "an IPv4 Internet to an IPv6 network").

Your servers stay IPv6-only, and IPv4 visitors can still reach them. Your servers see each visitor's IPv4 address, built into an IPv6 address (NAT46). Run IPv6-only inside, keep IPv4 only at the edge, and skip dual-stack on every server.

It has three parts:

  • Name-based proxy (TLS, QUIC and DTLS): an SNI proxy that sees which website a visitor asks for, and passes the encrypted connection on to the IPv6 server of that website. It never decrypts anything (TLS passthrough).
  • HTTP proxy: the same for plain HTTP, using the Host header.
  • SIIT-DC Border Relay (RFC 7755): gives a server its own IPv4 address, for anything that isn't a website, such as mail. It is a stateless SIIT translator, like Jool or TAYGA in SIIT mode, but in userspace. See SIIT-DC.

Quick start

A minimal config for one website:

# /etc/ipv4-br/config.yaml
proxy_source: 64:ff9b:1::/96

proxies:
  - name: web
    listen: [192.0.2.100]
    tls: [443]
    backends:
      - 2001:db8:aaaa:100::/56

Before it works, you need to route 64:ff9b:1::/96 back to this host; Deployment explains how.

CGO_ENABLED=0 go build -trimpath
./ipv4-br -config /etc/ipv4-br/config.yaml

Documentation

  • Deployment: how it works, and how to set up the host and systemd.
  • Configuration: every option, with examples.
  • Backend requirements: what your servers need to be reachable over IPv4.
  • Announcing with Bird: announcing the addresses, and withdrawing them when ipv4-br stops.
  • Outbound IPv4: how your IPv6-only hosts reach IPv4-only sites, with NAT66, DNS64, NAT64 or a CLAT.
  • Metrics: Prometheus metrics, a Grafana dashboard and example alerts.

Development

  • Run with go run . -config ./config.yaml.
  • Unit tests: go test ./....
  • End-to-end test: scripts/integration-test.sh. It runs in a throwaway network namespace, so it doesn't touch your network and doesn't need root.
  • Outbound test through NAT66 (Pattern B of Outbound IPv4): scripts/outbound-nat66-test.sh, also in throwaway namespaces. It needs nft, socat and iperf3.

Based on

License

MIT, see LICENSE.md.

About

IPv4 Border Relay for IPv6-only networks (HTTP, TLS & SIIT/full IP forward)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages