Repository navigation
unbeholden-wallet: add allowedClients for remote reverse proxies - #285
Conversation
The unit only allowed local IP addresses, so a reverse proxy on another host got no answer even with `address = "0.0.0.0"`. `allowedClients` adds addresses to the unit's IPAddressAllow. It is rejected with netns-isolation, whose namespaces drop LAN connections. Assisted-by: Claude Code (claude-opus-5-5)
systemd ignores entries of IPAddressAllow it can't parse, so a host name or typo would silently keep the client blocked. Assisted-by: Claude Code (claude-opus-5-5)
|
Reviewed head
Validation: |
The regex accepted malformed IPv6 addresses anyway. A proper address type can come later in nbLib; systemd ignores entries it can't parse. The tests now normalise bare addresses before comparing systemd's allowlist, and probe the denied client from outside every allowed network. Assisted-by: Claude Code (claude-opus-5-5)
|
Thanks @viberaven. Addressed in 5a5fa48:
The electrs, fulcrum and electrs-netns scenarios pass locally. |
|
Re-reviewed The earlier validation finding is superseded by the agreed
Validation: local |
systemd drops IPAddressAllow entries covered by a broader network, so the expected list does too; the electrs scenario now covers an overlapping list. The remote-client probe uses addresses set by its scenario, so other valid allowedClients no longer fail it. Assisted-by: Claude Code (claude-opus-5-5)
# Conflicts: # docs/release-notes.md
Assisted-by: Claude Code (claude-opus-5-5)
|
Fixed in d8458fb, and merged master (only conflict: release notes).
Validation: |
|
Re-reviewed
Local validation passed:
CI is green at this head. Other VM scenarios were not rerun locally. Address validation remains intentionally deferred per the earlier maintainer discussion. |
Summary
I ran Unbeholden Wallet on bitcoinix behind an https reverse proxy on another host and the proxy could never connect, even with
address = "0.0.0.0". The unit usesallowLocalIPAddresses, so systemd silently drops packets from any non-local address.This adds
services.unbeholden-wallet.allowedClients, IP addresses or networks appended to the unit'sIPAddressAllow:It's a list rather than
anybecauseIPAddressAllowalso filters outgoing traffic, and the wallet only needs the local Electrum server. Entries must be IP addresses or networks, since systemd ignores ones it can't parse. An assertion rejects the option with netns-isolation, which drops LAN connections anyway. Docs and 0.2.0 release notes are updated.Evidence
The
unbeholden-wallet-electrsscenario allows192.0.2.1and connects from two local addresses:curlexit 28).After: passes in the electrs and fulcrum scenarios, and the netns scenario is unchanged.
test/configuration.nixchecks the address validation and the netns assertion.The tor-enforce test now accepts each unit's extra allowed addresses. The
basicscenarios and nixos-search weren't run locally.Merge Danger
Door: two-way
Blast Radius: small
The option defaults to
[], so existing configs behave as before.