Passer au contenu

Nous améliorons nos opérations pour mieux vous servir. Les commandes sont expédiées normalement depuis Laval, QC. Questions? Contactez-nous

Bitcoin accepté au paiement  |  Expédié depuis Laval, QC, Canada  |  Soutien expert depuis 2016

NAT_OVERFLOW Warning

Router NAT Table Overflow — Miners Drop From Pool

Consumer router NAT/conntrack table fills under multi-miner load; outbound stratum, dashboard, and telemetry connections drop in waves. Cold-cycling the router temporarily restores connectivity. Real fix is enterprise-class router (MikroTik / Ubiquiti / pfSense), TCP keepalive tuning, and reducing per-miner parallel connections via local monitoring and a stratum proxy.

Warning — Should be addressed soon

Affected Models: Multi-miner home setups behind any consumer-grade router: TP-Link Archer / Asus RT-AX / Netgear Nighthawk / Bell HomeHub / Rogers Hitron / Vidéotron Helix / generic ISP gateways. Triggers at 3+ ASIC miners or 5+ Bitaxes; severe at 10+ devices. Affects Antminer (all), Whatsminer (all), Avalon (all), Bitaxe (all variants), NerdAxe / NerdQAxe / NerdNOS / NerdMiner.

Symptoms

  • Multiple workers cycling between online and offline on the pool dashboard every 30-120 minutes
  • All miners show stratum-disconnect events at roughly the same time, with reconnects spread over 1-5 minutes
  • Miner logs report `socket closed`, `connection reset by peer`, `stratum disconnect`, or `pool ping timeout` while pool status page shows no outage
  • WiFi and LAN reachability stay normal — only outbound TCP to stratum hosts drops
  • Fleet size is 3+ ASICs, 5+ Bitaxes, or any combination above 6 miners on a single consumer router
  • Cold-rebooting the router (60 sec power-off) stops drops for 30-120 minutes — strongest single indicator of NAT exhaustion
  • Router admin UI is sluggish or unreachable during the worst drop windows
  • Other LAN devices start dropping connections too — Zoom glitches, video buffers, smart-home gear loses contact
  • Drop frequency scales non-linearly with miner count — adding the 7th miner makes drops noticeably worse, not 15% worse
  • On Linux-based router firmware, `cat /proc/sys/net/netfilter/nf_conntrack_count` sits above 70% of `nf_conntrack_max` during drops
  • DNS resolves cleanly from a laptop on the same LAN, ruling out DNS-timeout class errors
  • Replacing the router with MikroTik / Ubiquiti / pfSense immediately ends the drop pattern

Step-by-Step Fix

1

Cold-cycle the router for 60 full seconds. Power off, wait one minute, power on. Wait 5 minutes for the LAN to reconnect. The NAT/conntrack table lives in volatile RAM — only a cold reboot flushes every entry. If pool drops vanish for 30+ minutes after this, NAT exhaustion is confirmed. Schedule a daily 3 AM reboot via the router's built-in scheduler as a band-aid until you replace the router.

2

Disable cloud-monitoring agents on every miner. Hiveon Agent, Awesome Miner cloud sync, MinerStat agent, ASIChub, AntMonitor — kill them all temporarily across the fleet. Each agent holds 1-3 long-lived TCP connections plus periodic UDP telemetry. Re-enable one at a time over a week and watch which one re-introduces drops. That's your culprit.

3

Close every miner web-UI tab on every device. Browser tabs pointed at AxeOS, AntMiner web, WhatsMiner BTMiner, NerdAxe AxeOS each hold a WebSocket consuming a NAT entry indefinitely. A household with two laptops × five open miner tabs = 10 entries doing nothing. Close them all; only open when actively making changes.

4

Move WiFi-only miners to Ethernet. Each WiFi miner adds AP-side conntrack on combined router/AP devices. Bitaxes and most ASICs ship Ethernet — use it. Twelve devices on a 24-port wired switch produces less conntrack churn than twelve devices on the WiFi radio.

5

Remove unused backup pool entries from miner configs. Miners support 2-3 pool slots; if you only mine one and the others are vestigial, delete them. Some firmware opens warm-standby connections to backup pools every 5-10 minutes, eating NAT entries for nothing. Single primary pool, no untested backups.

6

Increase `nf_conntrack_max` on Linux-based router firmware. SSH into the router and run `sysctl -w net.netfilter.nf_conntrack_max=32768`. Persist via `/etc/sysctl.conf` or the firmware's startup-script field. Each conntrack entry costs ~350 bytes of kernel RAM (32k entries ≈ 11 MB). If `sysctl` errors out, the firmware build has stripped the knob — flash OpenWRT/Merlin or replace the hardware.

7

Tune NAT timeouts: `sysctl -w net.netfilter.nf_conntrack_tcp_timeout_close=10` and `sysctl -w net.netfilter.nf_conntrack_tcp_timeout_close_wait=15` to clear half-closed sockets faster, plus `sysctl -w net.netfilter.nf_conntrack_udp_timeout=30` to flush zombie UDP entries from monitoring telemetry. Do NOT reduce `nf_conntrack_tcp_timeout_established` below 7200 sec — stratum's silent windows can run 10-15 min between `mining.notify` pushes, and a too-aggressive timeout will evict live connections.

8

Enable TCP keepalive on Linux-based miners. On DCENT_OS / Braiins OS+ / LuxOS / stock Antminer, edit `/etc/sysctl.conf` to add `net.ipv4.tcp_keepalive_time = 60`, `net.ipv4.tcp_keepalive_intvl = 30`, `net.ipv4.tcp_keepalive_probes = 4`. The miner sends a keepalive packet every 60 seconds, refreshing the NAT entry. Pool servers ignore keepalive payloads, so this is invisible to mining performance — but it prevents NAT-timeout-driven evictions.

9

Move monitoring on-LAN. Run Prometheus + Grafana on a Raspberry Pi inside your LAN. Every miner's exporter (Bitaxe `/api/system/info`, Antminer `cgminer-api` JSON, Whatsminer `btminer-api`) gets scraped locally. The Pi is the only thing reaching out to the WAN — for NTP and a single Tailscale/WireGuard tunnel for remote dashboard access. Net effect: outbound mining-monitoring flows drop from N×M to 0.

10

Replace the consumer router with a MikroTik hEX (RB750Gr3) or Ubiquiti EdgeRouter X (~$80-110 CAD). Default conntrack table is 65,536+ on both, tunable to 250,000+. Migrate WiFi to a dedicated access point (UniFi U6-Lite ~$130 CAD or any decent dumb AP). Configure: WAN on ether1, LAN on ether2-5, basic NAT masquerade. RouterOS / EdgeOS ship sane defaults; minimal initial config.

11

For 30+ miner home mines, run pfSense or OPNsense on a Protectli or Netgate appliance (~$200-450 CAD). Conntrack capacity is RAM-limited — default state table is 800,000+, can scale to millions. pfSense gives you full IDS/IPS, traffic-shaping, VLAN segmentation, and proper firewall rule engine. Overkill for 5 miners; correct for 30+.

12

VLAN-segment the mining traffic. Once you have an enterprise-class router, put miners on a dedicated VLAN with no IoT, no laptops, no smart TVs. Conntrack pressure on that VLAN's path is now only mining traffic — predictable, monitorable, alertable. Bonus: if a miner's firmware ever phones home to somewhere you don't trust, block it at the firewall without affecting the rest of the house.

13

Deploy a stratum proxy on your LAN. Braiins Farm Proxy (or self-hosted `stratum-proxy` / `stratum-mining-proxy`) takes one outbound connection to your chosen pool and multiplexes every miner's submitted shares through it. NAT pressure on the WAN drops from `2N` to `1`. For a 30-miner home mine, this single change solves the NAT problem permanently. Bonus: Braiins's proxy translates Stratum V1 ↔ V2 and gives per-miner share statistics.

14

Add monitoring of `nf_conntrack_count` itself to your Grafana dashboard. MikroTik exposes it via SNMP; pfSense via the default dashboard; OpenWRT via collectd. Alert at 70% of `nf_conntrack_max`. Catch the wall before you hit it instead of after the pool already showed offline workers.

15

Capture a 24-hour packet trace during a drop event for any future support escalation. On a Linux router: `tcpdump -i wan0 -w drop-event.pcap`. Open in Wireshark, filter by stratum host IPs, find the exact moment NAT entries were dropped. This artifact accelerates any consultation — D-Central or otherwise — from 4 hours to 1.

16

Stop DIY and book a D-Central mining consultation when: fleet is 30+ miners with drops persisting after enterprise router and stratum proxy; ISP throttling of long-lived TCP is suspected; you need VLAN-segmented design between mining / IoT / household; or you're moving from home mining to a small farm and the network needs proper architecture review.

17

What D-Central does in the consultation: full network audit (router, switch, AP roles), conntrack profiling, packet capture during a drop event, ISP uplink test, recommended layout (router model, VLAN plan, monitoring stack, pool-proxy if appropriate). Output is a one-page network architecture diagram and a procurement list — typically $400-1,500 CAD in hardware for a midsize home mine plus the consult fee.

18

Document your fleet network: every device on the LAN (model, firmware, IP, MAC), current router model and firmware, ISP service tier, 24-hour packet capture during a drop. Bring that to the consultation and it's 1 hour of work, not 4. The same document is your foundation for self-diagnosis the next time something breaks — and there will be a next time as the fleet grows.

When to Seek Professional Repair

If the steps above do not resolve the issue, or if you are not comfortable performing these repairs yourself, professional service is recommended. Attempting advanced repairs without proper equipment can cause further damage.

Related Error Codes

Still Having Issues?

Our team of Bitcoin Mining Hackers has been repairing ASIC miners since 2016. We have seen it all and fixed it all. Get a professional diagnosis.