Skip to content

feat(start-wrt): remove WAN remote access - #4710

Closed
gStart9 wants to merge 1 commit into
masterfrom
wrt/remove-wan-remote-access
Closed

gStart9 wants to merge 1 commit into
masterfrom
wrt/remove-wan-remote-access

Conversation

@gStart9

@gStart9 gStart9 commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

StartWRT's web interface and SSH no longer accept connections arriving on the WAN, and the Remote Access setting is removed.

Source addresses can be spoofed by the network operator (or in some cases, anyone on the network), so an address check shouldn't be used even as a partial authentication mechanism. Whoever sits on the path — the ISP, the upstream router it owns, or any other client on a network that the start9 router joins as its uplink (as proposed in #4613) — can send packets from a private address, so System Settings > Remote Access > "When behind NAT" (the default) admitted anyone whenever the router's WAN address was private (RFC1918), and choosing "Always" there put the login page on the public Internet.

After this PR, managing the router from outside is achieved via an Inbound VPN, as the docs already recommended. A follow-up PR (#4711) adds an opt-in for managing the router through an Outbound VPN connection such as a StartTunnel instance, which is the viable path for routers behind CGNAT.

Summary

  • Backend: removed the remote_access preference and its field on system.info / system.set-preferences, the system.apply-remote-access endpoint, the startwrt_remote_* firewall rules, the WAN SSH-session killer, and the re-application at daemon startup and from the 99-startwrt-remote-access hotplug hook (deleted, and no longer staged into the image).
  • Hostname routes on 443: removed the SNI fallback that sent WAN connections naming no routed hostname to the router's UI. Port 443 is now an ordinary port for the SNI demux.
  • Migration: RemoveWanRemoteAccess deletes existing startwrt_remote_* rules (matched by section or rule name) and the stored remote_access option, leaving every other rule alone.
  • UI: the Remote Access radio group and its warning are gone from Settings, with their strings in all five dictionaries and the help section in all five languages. The published-ports conflict message no longer mentions web or SSH access. The mock now reports VPN servers' UDP listen ports as router-held ports. Bindings are regenerated.
  • Docs: the Remote Access section is removed from settings.md; published-ports.md no longer describes Remote Access ports or 443 sharing; faq.md gains "How do I manage my router when I'm away from home?" (Inbound VPN). API_CONTRACT.md, backend/ARCHITECTURE.md and backend/README.md are updated.
  • Bench: mgmt install / mgmt remove bootstrapped over WAN port 22, which Remote Access opened. They now run over the serial console, and smoke expects the UI and port 22 to be closed from the WAN.
  • Release notes: a minor-removed-wan-remote-access fragment (selected for release notes, with translations), and release-notes/1.4.0.pre-update.md telling anyone who reaches the router over the WAN without a VPN to set up an Inbound VPN first.

#4613 (Wi-Fi uplink) builds on Remote Access, so its join warning, hotplug hook and SSH-session closing should be dropped when those parts rebase onto the code in this PR.

Verification

  • make start-wrt-test: 935 + 37 passed, including the new migration test.
  • make start-wrt-rpc-bindings: regenerated; the only change is the removed field and method.
  • npm run check:wrt, npm run check:i18n:wrt, npm run check:rpc-clients (29/29) pass.
  • bash projects/start-wrt/bench/bench.test.sh: 8/8. The smoke fixture now uses a private WAN address, so the previous script fails it.
  • node scripts/changelog.mjs check-version projects/start-wrt passes; notes compiles the new entry.

Not run

  • On the bench or a router: the migration on an upgraded image, the console-based mgmt install, and smoke against real hardware.
  • The de, es, fr and pl strings were written without native-speaker review.

🤖 Generated with Claude Code

The router's web interface and SSH no longer answer on the WAN. A source
address proves nothing about who sent a packet: whoever is on the path
(the ISP, the upstream router, or any client of a joined Wi-Fi uplink) can
send from a private address, so the "When behind NAT" mode admitted them,
and "Always" put the login page on the public Internet.

This removes the Remote Access setting, its firewall rules, the WAN SSH
session killer, the startup and hotplug re-application, and the SNI
fallback that sent unrouted connections on WAN port 443 to the web UI.
A boot migration deletes the existing startwrt_remote_* rules and the
stored setting. The settings page, API types, mock, help, dictionaries,
docs, and API contract drop it as well.

The bench's management port was bootstrapped over WAN port 22; mgmt
install and remove now run over the serial console, and smoke expects
the UI and port 22 to be closed from the WAN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gStart9

gStart9 commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

This is actually an openwrt feature, @Dominion5254 is going to set it to Never by default instead, but leave the option in place as upstream has it.

@gStart9 gStart9 closed this Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant