Independent discussion of crypto, wallets, cards and markets
Forum Home > Mining & Infrastructure > Running a Node > Firewall rules for a node: the minimum exposure set
Firewall rules for a node: the minimum exposure set131 replies · 4,326 views
Thread ToolsShow Printable Version · Subscribe to this Thread · Search Thread
Where to open an account: Open a Trustee account.

Firewall rules for a node: the minimum exposure set

A node that answers the world on every port is a node asking for trouble. Most node roles need only a handful of open doors: the peer port for chain traffic, maybe an RPC endpoint if you serve queries, and a management path that stays out of the public internet. A minimum-exposure firewall is not paranoia; it is the difference between a node and a target.

The exposure model

  • Outbound is free, inbound is risk. Peering works over outbound connections; every inbound port you open is a surface someone can scan, fingerprint, and probe. Open the minimum, and document why each door exists.
  • Public nodes need more doors than hidden ones. A node serving RPC to apps needs its API port reachable; a pure peer contributes without exposing anything but the peer port. Decide the role first, then the rules.
  • Management access is the crown jewel. SSH and admin interfaces should never face the public internet. Tunnel them, bind them to private networks, or restrict them to known addresses — in that order of preference.

The minimum exposure set

  1. Chain peer port, inbound only from the internet if you want inbound peers; outbound always. This is the only port a pure node strictly needs.
  2. RPC or API port, only if the node serves queries, and only with rate limits, authentication where possible, and a reverse proxy in front.
  3. Monitoring endpoint, bound to a private network or tunnel — never to all interfaces.
  4. SSH, key-only, non-default port optional, source-restricted or tunnel-only.
  5. Everything else: closed. Databases, debug interfaces, and client internals have no business being reachable.

The mistakes that get scanned

  • Default-deny without rules. A firewall that allows everything by default is decoration. Default-deny, then allowlist.
  • Database ports exposed. Chain databases and state stores sometimes listen on interfaces wider than intended. Check what is listening, not just what you configured.
  • Management ports on the public IP. The single most common node firewall failure: SSH or a web console reachable from anywhere, guessed by every scanner within hours.
  • Forgetting the updates. New services appear with new ports — indexers, exporters, sidecars. Re-audit the listening set after every change.

The audit habit

  • List what listens, periodically, from the machine itself: every bound socket, its interface, and its owner.
  • Compare against the intended set. Anything on the list that is not on the plan is a finding: remove it or justify it.
  • Test from outside. Scan your own public IP the way a scanner would. The results are the audit.
  • Change logs for rules. Every firewall change gets a reason and a date, so future-you knows which doors were opened on purpose.

The takeaway

Node firewalls work as a minimum-exposure set: peer port for chain traffic, API port only when serving, management access through tunnels or restrictions, everything else closed. Default-deny, audit the listening set, scan yourself, and document every door. The node that answers the fewest questions is the node that lasts longest.

Thread Statistics131 replies · 4,326 views