docs: add NAT traversal related documentation

This commit is contained in:
Wilmer Paulino 2018-06-12 18:31:37 -07:00
parent 6a6b490b50
commit c1886d2c1c
No known key found for this signature in database
GPG Key ID: 6DF57B9F9514972F
2 changed files with 35 additions and 0 deletions

23
docs/nat_traversal.md Normal file

@ -0,0 +1,23 @@
# NAT Traversal
`lnd` has support for NAT traversal using a number of different techniques. At
the time of writing this documentation, UPnP and NAT-PMP are supported. NAT
traversal can be enabled through `lnd`'s `--nat` flag.
```shell
$ lnd ... --nat
```
On startup, `lnd` will try the different techniques until one is found that's
supported by your hardware. The underlying dependencies used for these
techniques rely on using system-specific binaries in order to detect your
gateway device's address. This is needed because we need to be able to reach the
gateway device to determine if it supports the specific NAT traversal technique
currently being tried. Because of this, due to uncommon setups, it is possible
that these binaries are not found in your system. If this is case, `lnd` will
exit stating such error.
As a bonus, `lnd` spawns a background thread that automatically detects IP
address changes and propagates the new address update to the rest of the
network. This is especially beneficial for users who were provided dynamic IP
addresses from their internet service provider.

@ -77,6 +77,18 @@
; (with host:port notation), the default port (9735) will be added to the ; (with host:port notation), the default port (9735) will be added to the
; address. ; address.
; externalip= ; externalip=
;
; Instead of explicitly stating your external IP address, you can also enable
; UPnP or NAT-PMP support on the daemon. Both techniques will be tried and
; require proper hardware support. In order to detect this hardware support,
; `lnd` uses a dependency that retrieves the router's gateway address by using
; different built-in binaries in each platform. Therefore, it is possible that
; we are unable to detect the hardware and `lnd` will exit with an error
; indicating this. This option will automatically retrieve your external IP
; address, even after it has changed in the case of dynamic IPs, and advertise
; it to the network using the ports the daemon is listening on. This does not
; support devices behind multiple NATs.
; nat=true
; Debug logging level. ; Debug logging level.