Skip to content

presets/wireguard: nix-bitcoin-wg-connect queries external IP services over clearnet #67

Closed

Description

@ostermayer

Problem

modules/presets/wireguard.nix: nix-bitcoin-wg-connect without a host argument calls lndconnect --url --nocert --configfile=/dev/null --adminmacaroonpath=/dev/null to find the external IP (lines 70 to 78). lndconnect does this with the go-external-ip library. That library sends clearnet HTTP requests to several third-party IP echo services.

On a node that is set up for Tor only (secure-node.nix, enable-tor.nix), this is an unexpected clearnet connection from the operator's shell. It tells the third parties the node's public IP and the time of the query. The operator didn't ask for that. The WireGuard endpoint needs the public IP, but the operator can supply it.

Suggested fix

  • Make the host argument required. Print a short help text when it's missing: "Pass your public IP or DNS name as the first argument."
  • Or keep the lookup but ask first, and name the services it contacts.

The docs example in docs/services.md ("Use Zeus via WireGuard") should pass the host.

How found

LLM review (Kimi K3 max, GLM 5.3 max) flagged this. I verified it against the code. Severity: low, privacy only.

Activity

  1. added
    area: modules
    type: security
    on Oct 23, 2026
  2. added 2 commits that reference this issue on Nov 18, 2026
    6a1305d
    d329bab
  3. added a commit that references this issue on Nov 18, 2026
    a2804e0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: modulestype: security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions