Which ports to open, which to keep closed, and how to handle CGNAT.
| Port | Protocol | Direction | Service | Must be public? |
|---|---|---|---|---|
| 9735 | TCP | Inbound + Outbound | LND P2P (Lightning) | Yes — peers connect here |
| 10009 | TCP | Localhost only | LND gRPC | No — never expose to internet |
| 8080 | TCP | Localhost only | LND REST API | No — never expose to internet |
| 8332 | TCP | Localhost only | bitcoind RPC (full node only) | No — never expose |
| 8333 | TCP | Inbound + Outbound | bitcoind P2P (full node only) | Yes, for full node |
If your node uses Tor (enabled by default), these outbound ports must not be blocked by your firewall:
| Port | Protocol | Direction | Purpose |
|---|---|---|---|
| 9001 | TCP | Outbound | Tor relay connections |
| 9030 | TCP | Outbound | Tor directory connections |
| 443 | TCP | Outbound | Tor bridges (fallback) |
Tor-only mode requires NO inbound ports. If you can't open port 9735 (e.g., CGNAT), Tor-only operation is your best option. See the
lnd.confTor section.
# Allow Lightning P2P
sudo ufw allow 9735/tcp comment "LND Lightning P2P"
# If running bitcoind full node
sudo ufw allow 8333/tcp comment "Bitcoin P2P"
# Verify
sudo ufw statussudo iptables -A INPUT -p tcp --dport 9735 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 8333 -j ACCEPT # full node onlymacOS firewall doesn't block outbound by default. For inbound, allow Docker in System Settings → Network → Firewall → Options.
# PowerShell as Admin
New-NetFirewallRule -DisplayName "LND Lightning P2P" -Direction Inbound -LocalPort 9735 -Protocol TCP -Action AllowMost home internet requires port forwarding on your router:
- Find your machine's LAN IP:
hostname -I(Linux) oripconfig(Windows) - Log into your router (usually
192.168.1.1or192.168.0.1) - Find Port Forwarding settings
- Forward TCP 9735 → your machine's LAN IP, port 9735
- (Optional) Forward TCP 8333 if running a full node
After forwarding, test from outside your network:
# From a different machine or use an online port checker
nc -zv YOUR_PUBLIC_IP 9735Or use https://www.yougetsignal.com/tools/open-ports/
If your ISP uses CGNAT, you cannot open inbound ports. Signs of CGNAT:
- Your router's WAN IP starts with
100.64.x.xor10.x.x.x - Your router's WAN IP doesn't match what
curl ifconfig.meshows - Port forwarding is configured but external checks fail
-
Use Tor-only mode (recommended) — no inbound ports needed:
- In
lnd.conf, ensuretor.active=trueandtor.v3=true - Comment out
tor.skip-proxy-for-clearnet-targets=true - Enable
tor.streamisolation=true - Peers connect to your
.onionaddress instead
- In
-
Use a VPS — rent a small VPS ($5/month) with a public IP and run the node there
-
Use a VPN with port forwarding — some VPN providers (e.g., Mullvad) offer port forwarding
-
Ask your ISP — some ISPs will assign you a public IP on request (sometimes for a fee)
- ❌ NEVER expose port 10009 (gRPC) or 8080 (REST) to the internet
- ❌ NEVER expose port 8332 (bitcoind RPC) to the internet
- ✅ Only port 9735 (and optionally 8333) should be publicly accessible
- ✅ Use SSH tunnels if you need remote access to gRPC/REST:
ssh -L 10009:localhost:10009 your-server