Added UPnP content (#1689)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
This commit is contained in:
MadelineMurray
2019-07-17 18:55:43 +10:00
committed by GitHub
parent 83f97f6e8d
commit e1ef09a1b7
6 changed files with 59 additions and 0 deletions

View File

@@ -9,6 +9,10 @@ Ports must be exposed appropriately to enable communication. An example port con
When running Pantheon from the [Docker image](../../Getting-Started/Run-Docker-Image.md), [expose ports](../../Getting-Started/Run-Docker-Image.md#exposing-ports).
!!! tip
Pantheon supports [UPnP](Using-UPnP.md) for home or small office environments where a wireless router
or modem provides NAT isolation.
## P2P Networking
To enable peer discovery, the P2P UDP port must be open for inbound connections.

View File

@@ -0,0 +1,32 @@
description: Configuring UPnP with Pantheon
<!--- END of page meta data -->
# UPnP
Enable UPnP to quickly allow inbound peer connections without manual router configuration. Use UPnP
in home or small office environments where a wireless router or modem provides NAT isolation.
UPnP automatically detects that a node is running in a UPnP environment and provides port forwarding.
!!! tip
UPnP support is often disabled by default in networking firmware. If disabled by default, explicitly
enable UPnP support.
## Enabling UPnP
Use the [`--nat-method`](../../Reference/Pantheon-CLI-Syntax.md#nat-method) command line option to enable UPnP.
!!! note
Enabling UPnP may slow down node startup, especially on networks without a UPnP gateway device.
When UPnP is enabled:
* [Enode](../Node-Keys.md#enode-url) advertised to other nodes during discovery is the external IP address and port.
* External address and port are returned by the [`admin_NodeInfo`](../../Reference/Pantheon-API-Methods.md#admin_nodeinfo)
JSON-RPC API method for the `enode` and `listenAddr` properties.
While Pantheon is running, UPnP does not support:
* IP address changes
* Disabling UPnP. To disable UPnP, restart the node without the [`--nat-method`](../../Reference/Pantheon-CLI-Syntax.md#nat-method)
option or set to `NONE`.

View File

@@ -43,6 +43,9 @@ Specified by the [`--p2p-host`](../Reference/Pantheon-CLI-Syntax.md#p2p-host) an
The enode is displayed when starting a Pantheon node and can be obtained using the [`net_enode`](../Reference/Pantheon-API-Methods.md#net_enode)
JSON-RPC API method.
If [UPnP](Networking/Using-UPnP.md) is enabled, the enode advertised to other nodes during discovery is the
external IP address and port.
## Specifying a Custom Node Private Key File
Use the [`--node-private-key-file`](../Reference/Pantheon-CLI-Syntax.md#node-private-key-file) option to specify a custom `key` file in any location.

View File

@@ -100,6 +100,8 @@ Properties of the node object are:
!!! note
If the node is running locally, the host of the `enode` and `listenAddr` are displayed as `[::]` in the result.
If [UPnP](../Configuring-Pantheon/Networking/Using-UPnP.md) is enabled, the external address is
displayed for the `enode` and `listenAddr`.
!!! example
```bash tab="curl HTTP request"

View File

@@ -586,6 +586,23 @@ min-gas-price=1337
The minimum price that a transaction offers for it to be included in a mined block.
The default is 1000.
### nat-method
```bash tab="Syntax"
--nat-method=<METHOD>
```
```bash tab="Command Line"
--nat-method=upnp
```
```bash tab="Example Configuration File"
nat-method="upnp"
```
Specifies the method for handling [NAT environments](../Configuring-Pantheon/Networking/Using-UPnP.md).
Options are `upnp` and `none`. The default is `none` (that is, NAT functionality is disabled).
### network
```bash tab="Syntax"

View File

@@ -90,6 +90,7 @@ nav:
- Bootnodes: Configuring-Pantheon/Networking/Bootnodes.md
- Configuring Ports: Configuring-Pantheon/Networking/Configuring-Ports.md
- Managing Peers: Configuring-Pantheon/Networking/Managing-Peers.md
- Using UPnP: Configuring-Pantheon/Networking/Using-UPnP.md
- Consensus Protocols:
- Pantheon Consensus Protocols: Consensus-Protocols/Overview-Consensus.md
- Comparing PoA Consensus Protocols: Consensus-Protocols/Comparing-PoA.md