Installer does not properly setup IPv6, inbound messages fail SPF #65

Closed
opened 2026-11-15 13:45:25 +00:00 by faisal · 1 comment

I noticed a few emails were failing SPF and the platform was reporting that the email came from 172.31.253.1 thus messages were failing SPF and it was sending DMARC failure reports to senders.

I was able to trace it to the container being IPv4 only. The behavior is documented on Docker’s side. When the Docker gateway lacks an IPv6 address, IPv6 connections are given an IPv4 gateway address as their source.

Expected
Remote IP is the sender's real address for both IPv4 and IPv6.

Actual

  • IPv4: real remote IP.
  • IPv6: Remote IP = 172.31.253.1 (Docker bridge gateway).
    Cause: the generated network has no IPv6, so docker-proxy relays IPv6 connections to the container over IPv4.

Impact

  • SPF, DMARC and iprev evaluated against the gateway IP.
  • Per-IP bans and rate limits collapse all IPv6 senders onto one address.
  • Any rule trusting private ranges trusts all IPv6 senders.

I've temporarily removed the AAAA record on DNS, as I don't want to muck with the docker networking settings and make things worse.

Installer used latest stable, I have since manually upgraded the containers to server 27.1-rc.23

I noticed a few emails were failing SPF and the platform was reporting that the email came from 172.31.253.1 thus messages were failing SPF and it was sending DMARC failure reports to senders. I was able to trace it to the container being IPv4 only. The behavior is documented on Docker’s side. When the Docker gateway lacks an IPv6 address, IPv6 connections are given an IPv4 gateway address as their source. **Expected** Remote IP is the sender's real address for both IPv4 and IPv6. **Actual** - IPv4: real remote IP. - IPv6: Remote IP = 172.31.253.1 (Docker bridge gateway). Cause: the generated network has no IPv6, so docker-proxy relays IPv6 connections to the container over IPv4. **Impact** - SPF, DMARC and iprev evaluated against the gateway IP. - Per-IP bans and rate limits collapse all IPv6 senders onto one address. - Any rule trusting private ranges trusts all IPv6 senders. I've temporarily removed the AAAA record on DNS, as I don't want to muck with the docker networking settings and make things worse. Installer used latest stable, I have since manually upgraded the containers to server 27.1-rc.23
jcoffey-dev added the bug
priority
p1
security
labels 2026-11-15 19:15:07 +00:00
jcoffey-dev self-assigned this 2026-11-15 19:15:07 +00:00
Owner

Thanks for tracking this down, Faisal. You were right: the installer made its network IPv4 only, so Docker relayed every IPv6 connection from its gateway and the server never saw the real sender.

This is fixed in installer 2026.11.15, out now (and 27.1-rc.10 on the RC line). On a machine with IPv6 the network now carries IPv6 too. Docker before 27 also needs ip6tables turned on for this. --install-deps offers to set it in /etc/docker/daemon.json, which restarts Docker.

To bring your install over, run inbuxa install again with the options you installed with, plus --install-deps. inbuxa upgrade alone won't change the network. After that your AAAA record can go back.

Thanks for tracking this down, Faisal. You were right: the installer made its network IPv4 only, so Docker relayed every IPv6 connection from its gateway and the server never saw the real sender. This is fixed in installer 2026.11.15, out now (and 27.1-rc.10 on the RC line). On a machine with IPv6 the network now carries IPv6 too. Docker before 27 also needs ip6tables turned on for this. `--install-deps` offers to set it in /etc/docker/daemon.json, which restarts Docker. To bring your install over, run `inbuxa install` again with the options you installed with, plus `--install-deps`. `inbuxa upgrade` alone won't change the network. After that your AAAA record can go back.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: inbuxa/inbuxa-installer#65