Two networking mistakes cause more headaches on European Linux servers than any hardware bottleneck: Docker containers silently bypassing host ufw rules, and broken /64 IPv6 routing (especially when toggling Netcup’s IPv6-Only Geek Saver in our Real TCO Calculator to save €0.50/mo net / €0.60/mo gross). Here is our verified production setup from Nuremberg (AS197540).
1. Clean /64 IPv6 Host Addressing (fe80::1 Link-Local Gateway)
Netcup assigns every server a static /64 IPv6 prefix (visible under SCP → Network) routed via the hypervisor’s link-local gateway fe80::1. On Debian 12 (ens3), bind ::1/64 statically on the host so outbound IPv6 traffic and Docker’s ip6tables NAT egress share a deterministic primary address:
# /etc/network/interfaces (replace 2a03:4000:60:abcd::/64 with your SCP /64 prefix)
iface ens3 inet6 static
address 2a03:4000:60:abcd::1/64
gateway fe80::1
dns-nameservers 2606:4700:4700::1111 2620:fe::fe
Verify dual-stack reachability immediately with ip -6 route show default and curl -6 -I https://cloudflare.com.
2. Enabling Native IPv6 + ip6tables Isolation in Docker Engine
Without ip6tables: true, enabling IPv6 in Docker can leave container IPv6 ports unfiltered. Configure /etc/docker/daemon.json on Docker Engine 26/27+ so bridge networks receive Dual-Stack + stateful ip6tables NAT/filter protection:
{
"ipv6": true,
"ip6tables": true,
"experimental": false,
"fixed-cidr-v6": "fd00:dead:beef:1::/80",
"log-driver": "json-file",
"log-opts": {
"max-size": "20m",
"max-file": "3"
}
}
Using a Unique Local Address (fd00:...::/80) with Docker’s built-in IPv6 NAT (ip6tables: true) gives every container outbound IPv6 connectivity (via the host’s 2a03:4000:...::1 address) without assigning publicly routable IPs directly to internal Redis or PostgreSQL containers!
3. Stopping the Docker UFW Bypass (Defense-in-Depth)
Whenever a docker-compose.yml file declares ports: ["5432:5432"], Docker rewrites kernel PREROUTING / FORWARD chains before ufw’s INPUT rules evaluate—exposing your database to the entire internet even when ufw status says 5432 DENY. Apply all three layers below so a misconfigured Compose stack can never leak:
| Defense Layer | Exact Configuration | What It Prevents |
|---|---|---|
| 1. Compose Loopback Bind | Write 127.0.0.1:5432:5432 (or omit ports: and join an internal Docker bridge) | Keeps internal ports off 0.0.0.0 and [::] completely |
2. Kernel DOCKER-USER Chain | Drop unsolicited external FORWARD packets on ens3 except 80/443 | Blocks accidental -p 8080:8080 mistakes inside Linux |
| 3. Outer Netcup SCP Firewall | SCP → Network → Firewall: Allow TCP 22, 80, 443 & UDP 443, default DROP | Hypervisor-enforced: blocks scans outside the VM before Docker sees a single packet! |
To verify what is genuinely reachable from outside your VM, run ss -tulnp on the host and scan your public IPv4/IPv6 from a separate machine.
4. Running Pure IPv6-Only (-€0.50/mo Net) with DNS64/NAT64
Deselecting public IPv4 during Netcup checkout drops a VPS pico G11.5s to €1.35/mo net (€1.61/mo gross; vouchers are not combinable on VPS Lite) and saves €6.00/yr net (€7.20/yr gross) on any G12.5 Root-Server or VPS. Because legacy endpoints like github.com still rely on IPv4 A records, add European public DNS64/NAT64 resolvers (nat64.net operated in Europe) so git clone, curl, and apt transparently reach IPv4-only hosts over IPv6:
# Configure European DNS64/NAT64 resolvers on an IPv6-only Netcup VM
sudo mkdir -p /etc/systemd/resolved.conf.d
cat <<'EOF' | sudo tee /etc/systemd/resolved.conf.d/nat64.conf
[Resolve]
DNS=2a00:1098:2b::1 2a00:1098:2c::1 2a01:4f8:c2c:123f::1
FallbackDNS=2606:4700:4700::64 2606:4700:4700::6400
EOF
sudo systemctl restart systemd-resolved
# Test pulling from IPv4-only GitHub over synthesized NAT64!
curl -I https://github.com
For inbound visitors on IPv4-only mobile/home ISPs, point an AAAA record on Cloudflare DNS (Orange Cloud Proxied) to your server’s 2a03:4000:...::1 address—Cloudflare terminates both IPv4 and IPv6 at the edge for €0 and proxies upstream to your Netcup origin over pure IPv6!
RS 1000 G12.5
2 Months Free · Valid for New & Existing Customers (12M Term)