Skip to content

luci-app-ap-modem: add optional SNAT settings for modem management access#109

Draft
MichaelPei wants to merge 1 commit into
linkease:mainfrom
MichaelPei:feat/ap-modem-optional-snat
Draft

luci-app-ap-modem: add optional SNAT settings for modem management access#109
MichaelPei wants to merge 1 commit into
linkease:mainfrom
MichaelPei:feat/ap-modem-optional-snat

Conversation

@MichaelPei

Copy link
Copy Markdown

Summary

This PR adds an optional SNAT mode to luci-app-ap-modem for PPPoE bridge modem-management scenarios where routing exists but modem UI does not respond to LAN-origin requests.

Closes #108.

What changed

  • LuCI Global Settings:
    • Enable SNAT for modem management (default off)
    • SNAT destination IP (e.g. modem IP 192.168.1.1)
    • SNAT source IP (e.g. WAN virtual IP 192.168.1.254)
  • Default config (/etc/config/ap_modem) now includes SNAT options (disabled by default).
  • Init script (/etc/init.d/ap_modem):
    • Creates firewall.ap_modem_snat nat rule when SNAT is enabled and IPs are set.
    • Removes this rule when disabled / stopped.
  • zh-cn translations for new fields.

Why

On some modem firmware, LAN->modem management traffic only works if source IP appears in modem subnet (or expected interface policy). Optional SNAT resolves this without changing existing default behavior.

Compatibility

  • Default behavior unchanged (snat_enabled=0).
  • Existing users are unaffected unless they enable SNAT.

@jjm2473 jjm2473 marked this pull request as draft February 24, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

luci-app-ap-modem: PPPoE bridge modem UI may require optional SNAT

1 participant