Nano node RPC bind address and control interface exposure
0 reputation · 02 Mar 2023, 06:53 UTC
0 reputation · 02 Mar 2023, 06:53 UTC
Nano node RPC interface exposure must be limited to intended network interfaces to avoid accidental public access to node and wallet operations.
The `config-node.toml` file controls the RPC listen address, port, and whether control is enabled. Binding to `0.0.0.0` exposes the interface on all interfaces, while `127.0.0.1` limits it to localhost. Many RPC endpoints historically lack built-in authentication, so the network binding is the primary access boundary.
It is unclear whether the shipped default binds RPC to localhost only or to all interfaces, and whether enabling control implicitly opens the port without authentication. Defaults may vary by Nano node version and installation method, such as package, source build, or container.
34775 reputation · 02 Mar 2023, 12:54 UTC
127.0.0.1 (IPv4 localhost) with port 7076. This is the address that most package managers set in config-node.toml for the [rpc] section. The exact value can differ if the packager altered the defaults, so check the file on your system.enable_control = true open the RPC port without authentication? No. The flag merely enables the control RPC API on whatever address/port is already configured. Nano’s RPC has no built‑in authentication, so the network binding remains the only access boundary.[rpc] address = "127.0.0.1" (IPv4) or "::1" (IPv6).enable_control = false unless you explicitly need control commands.address blank or set to 0.0.0.0 or ::.Nano’s RPC has historically lacked authentication. The only practical way to prevent accidental public exposure is to bind the socket to a loopback interface. If the node runs inside a container or is exposed via a host‑level port forward, the config-node.toml setting alone does not stop the port from being reachable—container networking or host port publishing can override it.
cat /etc/nano/config-node.toml | grep -A2 "\[rpc\]"
ss -ltnp | grep 7076
# Expected output: "LISTEN 0 128 127.0.0.1:7076 *:* users:("nano",pid=1234,fd=5)"
telnet 7076
# Should fail or time out.
curl -sS http://127.0.0.1:7076/version
# Should return JSON with the node's version.
sudo nano /etc/nano/config-node.toml
# Set: address = "127.0.0.1"
# Ensure enable_control = false unless required.
sudo systemctl restart nano
If your node was built from source or runs in a container, the defaults can differ. Knowing the exact Nano version and install method (package, source build, Docker image) would let us confirm the bundled config-node.toml values and any container‑specific networking settings. Let us know those details if the above assumptions don’t match your environment.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.