ISP modem drops UPnP NAT mappings after brief DSL SNR resyncs, breaking incoming services
Environment
Consumer DSL setup: ISP-supplied modem/router (firmware-controlled NAT) connected to an OpenWrt home router (routed mode) running miniupnpd. WAN link: ADSL/VDSL with occasional SNR fluctuations leading to brief resyncs. Services affected: home CCTV (ports 8443), self-hosted game server (UDP 27015).
Symptoms
From the internet, previously reachable services become unreachable after an overnight link blip; checking external port checkers shows ports closed. From LAN, services are up and listening. UPnP mappings seen in OpenWrt disappear after the modem reports a DSL retrain; mappings only restore after a modem power-cycle or manual re-request from the internal client.
Observations
OpenWrt syslog shows miniupnpd errors around the time of the DSL resync: 'upnp: IPv4 gateway changed' and subsequent removal of all mappings. The ISP modem web UI shows a short DSL resync (seconds) and internal NAT session table flushes; WAN IP remained the same after resync. Manually reissuing a UPnP mapping (from the host) restores the mapping immediately and services are reachable again until next resync. No CGNAT visible from repeated external checks (public IP matches ISP portal).
Already attempted
Upgraded miniupnpd package to latest stable on OpenWrt; bound UPnP to the WAN interface explicitly; tried to set modem to bridge mode but the ISP portal did not allow it; created a cron job to reapply mappings after detecting WAN flaps. Replaced Ethernet cable between modem and router. Symptoms persist: mappings still disappear on modem-triggered resyncs.
Question
Why do UPnP mappings vanish when the DSL link briefly resyncs even if the WAN IP does not change, and what is the safest way to make inbound ports persist across short link disruptions without needing daily manual reconfiguration or a modem power-cycle?
Verified community troubleshooting
No answers yet..
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags