Unrestricted monerod RPC exposed to the internet via monero.polensky.me #8

Open
opened 2026-11-16 10:38:51 -05:00 by polen · 0 comments
Owner

Problem

monero.polensky.me (HTTPS and plain HTTP vhosts in devices/server/configuration.nix) proxies to asus:18081. That port is the full, unrestricted monerod RPC (services.monero.rpc.address = "0.0.0.0" in devices/asus/configuration.nix).

Anyone on the internet can call admin methods: stop_daemon, start_mining (to their own address), set_limits, peer bans, txpool flush.

Fix

  • Add a restricted RPC listener on asus (rpc-restricted-bind-ip=0.0.0.0, rpc-restricted-bind-port=18089 in services.monero.extraConfig).
  • Point both Caddy vhosts and services.monero-wallet-monitor.daemonAddress at the restricted port.
  • Bind the unrestricted RPC to 127.0.0.1 (p2pool and the json-exporter are local to asus) and remove 18081 from the asus firewall.

Done when

curl https://monero.polensky.me/stop_daemon no longer reaches an unrestricted endpoint, and wallets and p2pool still sync.

## Problem `monero.polensky.me` (HTTPS and plain HTTP vhosts in `devices/server/configuration.nix`) proxies to `asus:18081`. That port is the full, unrestricted monerod RPC (`services.monero.rpc.address = "0.0.0.0"` in `devices/asus/configuration.nix`). Anyone on the internet can call admin methods: `stop_daemon`, `start_mining` (to their own address), `set_limits`, peer bans, txpool flush. ## Fix - Add a restricted RPC listener on asus (`rpc-restricted-bind-ip=0.0.0.0`, `rpc-restricted-bind-port=18089` in `services.monero.extraConfig`). - Point both Caddy vhosts and `services.monero-wallet-monitor.daemonAddress` at the restricted port. - Bind the unrestricted RPC to 127.0.0.1 (p2pool and the json-exporter are local to asus) and remove 18081 from the asus firewall. ## Done when `curl https://monero.polensky.me/stop_daemon` no longer reaches an unrestricted endpoint, and wallets and p2pool still sync.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
polen/nixos#8
No description provided.