Skip to main content
SSH Lab & Live Vouchers
EU EUServerLab
GUIDE Updated: · 8 min read

Netcup /64 IPv6, Docker Dual-Stack & Firewall Hardening Guide (incl. IPv6-Only NAT64)

Configure Netcup routed /64 IPv6 on Debian 12, enable Docker dual-stack, prevent bypassed host firewall ports via SCP + 127.0.0.1, and run IPv6-only NAT64.

By Hai Liu (Systems & Cloud TCO Engineer) · * Outbound voucher & store links (rel="sponsored") help fund our lab at zero extra cost to you.

Summary

Updated: 2026-11-22

Quick Execution Checklist

  1. 1
    Verify Static /64 IPv6 & fe80::1 Gateway on Primary Interface

    Confirm your SCP-assigned /64 prefix::1 is bound on ens3 with fe80::1 as default IPv6 gateway and test ping6 -c 3 2606:4700:4700::1111.

  2. 2
    Enable ip6tables & Private ULA /80 in /etc/docker/daemon.json

    Turn on ipv6, ip6tables, and fixed-cidr-v6 with a private ULA /80 subnet (fd00:dead:beef:1::/80) for stateful IPv6 NAT, then restart docker.

  3. 3
    Bind Internal Ports to 127.0.0.1 & Lock Down Outer SCP Firewall

    Publish databases on 127.0.0.1 only and restrict inbound public traffic at the hypervisor layer in Netcup SCP -> Firewall to TCP 22/80/443 and UDP 443.

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).

CONTROL PANEL REFERENCE AS197540 · SCP
Server Control Panel (SCP) — VPS 500 G12.5 Management View
servercontrolpanel.de · KVM Console · Custom ISO · €0 CoW Snapshots · Firewall
💿 Media / Custom ISO
Mount Proxmox VE / Debian 12 / Alpine (.iso)
📸 Snapshots (CoW)
€0.00 Free Copy-on-Write Instant Rollback
🔓 SCP → Firewall
Delete "netcup Mail block" → Unlocks TCP 25/465/587 in 1 Click
🌐 Network & rDNS
2.5 Gbps EU/US Fair-Use · IPv4 /22 + IPv6 /64 PTR
Netcup's hypervisor-level SCP Firewall filters inbound packets upstream of your VM — preventing Docker NAT rules from exposing internal ports

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 LayerExact ConfigurationWhat It Prevents
1. Compose Loopback BindWrite 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 ChainDrop unsolicited external FORWARD packets on ens3 except 80/443Blocks accidental -p 8080:8080 mistakes inside Linux
3. Outer Netcup SCP FirewallSCP → Network → Firewall: Allow TCP 22, 80, 443 & UDP 443, default DROPHypervisor-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!

Edge-Cached Pool · Click Code to Auto-Apply
Select Model Tier:
#rs1

RS 1000 G12.5

2 Months Free · Valid for New & Existing Customers (12M Term)

EPYC 9645/9655 Zen 5 4 Dedicated Cores 8GB DDR5 ECC 128GB NVMe · 2.5G EU/US
★ Savings Check vs. €5 Net Welcome Code (#5e)
At 0% Non-EU VAT, #rs1 saves €36.52 net vs. €5.00 net with #5e — €31.52 extra net savings.
Drawing random code (1 of 5)... 1/5 Use This Voucher Automatically * →
* Partner link (zero extra cost to you)
Auto-applies via ?gutschein= cart link · Product vouchers work for new & existing accounts. Full Voucher Rules & Pool →

Frequently Asked Questions

Why can scanners still reach my PostgreSQL or Redis container after I enabled UFW? ▼

When you publish a Docker port on 0.0.0.0 (for example -p 5432:5432), Docker programs DNAT rules in the kernel PREROUTING/FORWARD path that bypass standard UFW INPUT rules. Always bind internal containers to loopback (-p 127.0.0.1:5432:5432) AND add an explicit hypervisor-level allowlist in Netcup SCP -> Firewall, which filters packets outside your VM before Docker ever sees them.

What IPv6 gateway does Netcup use across Nuremberg, Vienna, Amsterdam, and Manassas? ▼

Across all G12.5 and G11.5s KVM hosts, Netcup routes your assigned /64 IPv6 prefix over the link-local gateway fe80::1 on your primary VirtIO interface (ens3 / eth0).

Can an IPv6-only Netcup server (-€0.50/mo net saver) pull from GitHub or IPv4-only APIs? ▼

Yes! Set DNS64 resolvers (such as nat64.net 2a00:1098:2c::1 and 2a00:1098:2b::1) in /etc/systemd/resolved.conf or /etc/resolv.conf for outbound IPv4 synthesis, and place Cloudflare CDN (free dual-stack proxy) in front of your AAAA record so IPv4 visitors can reach your web apps.

Related Reviews & Setup Guides

Provider Comparisons