doc: update faq and docs for IP discovery

This commit is contained in:
Michael Schmoock 2022-03-11 19:14:14 +01:00 committed by Rusty Russell
parent 6a146bed26
commit 9703ee05bf
3 changed files with 17 additions and 2 deletions

View File

@ -70,8 +70,13 @@ Note that if you already have a channel open to them, you'll need to close it be
### Are there any issues if my node changes its IP address? What happens to the channels if it does?
There is no risk to your channels if your IP address changes.
However, be sure to change your announced address (or [setup a TOR hidden service](TOR.md))
in your config so that others can establish connections at your new address !
Other nodes might not be able to connect to you, but your node can still connect to them.
But c-lightning also has an integrated IPv4/6 address discovery mechanism.
If your node detects an new public address, it will update its announcement.
For this to work binhind a NAT router you need to forward the TCP port 9735 to your node.
Alternatively, you can [setup a TOR hidden service](TOR.md) for your node that
will also work well behind NAT firewalls.
### Can I have two hosts with the same public key and different IP addresses, both online and operating at the same time?

View File

@ -47,6 +47,12 @@ Tor provides NAT-traversal for free, so even if you or your ISP has a complex
network between you and the Internet, as long as you can use Tor you can
be connected to.
Note: c-lightning also support IPv4/6 address discovery behind NAT routers.
For this to work you need to forward the TCP port 9735 to your node.
In this case you don't need TOR to punch through your firewall.
This usually has the benefit of quicker and more stable connections but does not
offer additional privacy.
On most Linux distributions, making a standard installation of `tor` will
automatically set it up to have a SOCKS5 proxy at port 9050.
As well, you have to set up the Tor Control Port.

View File

@ -350,6 +350,10 @@ right thing: for the mainnet (bitcoin) network it will try to bind to
port 9735 on IPv4 and IPv6, and will announce it to peers if it seems
like a public address.
c-lightning also support IPv4/6 address discovery behind NAT routers.
If your node detects an new public address, it will update its announcement.
For this to work you need to forward the TCP port 9735 to your node.
You can instead use *addr* to override this (eg. to change the port), or
precisely control where to bind and what to announce with the
*bind-addr* and *announce-addr* options. These will **disable** the