The network the installer writes was IPv4 only. Docker relays an IPv6 connection to a published port of an IPv4-only container through docker-proxy, so the server saw every client that connected over IPv6 as the network's gateway, 172.31.253.1: SPF, DMARC and iprev were checked against it, IPv6 senders shared one set of bans and rate limits, and with --proxy snippets (or front ends on the host) the gateway is on the server's allowed list, so IPv6 clients were never banned at all. On a machine with IPv6, compose.yaml now gives the network a unique local /64 (fd69:6e62:7578::/64) beside the IPv4 subnet. Re-running install converges an existing deployment: compose recreates the network. That is enough with Docker 27 and later and with podman, which forward both families themselves. Docker before 27 still relays IPv6 unless ip6tables is on, which there also takes "experimental" (with ip6tables alone the daemon does not start). The survey now reads the engine version and /etc/docker/daemon.json, and deps offers to set both keys, keeping the old file as daemon.json.before-inbuxa and putting it back if Docker does not come up on the new one. Without --install-deps the plan warns instead, and it never writes over a daemon.json it cannot parse. Outbound mail is unchanged in practice: the server tries IPv4 first by default and uses IPv6 only for hosts that have no IPv4 address. e2e/cases/ipv6-sources.sh opens SMTP sessions from a second network namespace with addresses of its own; with OLD_REF it shows the bug on an install from before the fix, then converges it. Fixes #65
42 lines
1.4 KiB
Go
42 lines
1.4 KiB
Go
// SPDX-FileCopyrightText: 2026 Coffey Labs LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
package host
|
|
|
|
import "testing"
|
|
|
|
// Measured on Debian 13's docker.io 26.1.5 (#65): without ip6tables an IPv6
|
|
// client of a published port reached the container as the gateway; with
|
|
// "ip6tables" and "experimental" on, as itself; with "ip6tables" alone the
|
|
// daemon would not start.
|
|
func TestDockerForwardsIPv6(t *testing.T) {
|
|
for _, c := range []struct {
|
|
version, daemon string
|
|
want bool
|
|
}{
|
|
{"26.1.5+dfsg1", "", false},
|
|
{"26.1.5+dfsg1", `{"ip6tables": true}`, false},
|
|
{"26.1.5+dfsg1", `{"ip6tables": true, "experimental": true}`, true},
|
|
{"27.0.3", "", true},
|
|
{"29.0.1", `{"log-driver": "journald"}`, true},
|
|
{"29.0.1", `{"ip6tables": false}`, false},
|
|
{"", "", false},
|
|
} {
|
|
got, err := DockerForwardsIPv6(c.version, []byte(c.daemon))
|
|
if err != nil || got != c.want {
|
|
t.Errorf("Docker %q with %q: got %v, %v; want %v", c.version, c.daemon, got, err, c.want)
|
|
}
|
|
}
|
|
if _, err := DockerForwardsIPv6("29.0.1", []byte("{not json")); err == nil {
|
|
t.Error("a daemon.json that is not JSON was read as something")
|
|
}
|
|
}
|
|
|
|
func TestDockerMajor(t *testing.T) {
|
|
for v, want := range map[string]int{"26.1.5+dfsg1": 26, "v29.0.1": 29, "28": 28, "": 0, "dev": 0} {
|
|
if got := DockerMajor(v); got != want {
|
|
t.Errorf("DockerMajor(%q) = %d, want %d", v, got, want)
|
|
}
|
|
}
|
|
}
|