- difference between --bind-addr=autotor and --addr=autotor
- typos corrected (non-persistent and Tor)
- "references" dropped
- table improved
- Outgoing case explained where is useful
The actual structure suffers of many repetitions. I could work on
a compact structure based on a "decision tree modular" approach if that
may seem useful.
| 7 | Not Announced | v3 + v2 + temp-v2 | Incoming |
| 8 | Public | NO |
| 8 | Public | NO | Outcoing socks5 . |
NOTE:
NOTE:
1. Pers.V2: The Version 2 onion address is persistent across TOR service restarts.
1. v2: The Version 2 onion address is persistent across Tor service restarts.
It is created when you create the [TOR Hidden Service]
It is created when you create the [Tor Hidden Service](#Creation-of-an-hidden-service-for-a-persistent-.onion-address).
2. NPers.V2: The Version 2 onion address changes at each restart of the TOR service.
2. temp-v2: The Version 2 onion address changes at each restart of the Tor service.
A non persistent .onion address is generated by accessing an auto service (see above)
A non-persistent .onion address is generated by accessing an [auto service](#creation-of-an-auto-service-for-non-persistent-.onion-addresses).
All the .V3 addresses referes to [.onion addresses version 3].
3. All the v3 addresses referes to [.onion addresses version 3].
#### Case 1 c-lightning has a public IP address and no TOR hidden service address, but can connect to an onion address via a TOR socks 5 proxy.
4. In all the "Incoming" use case, the node can also make "Outgoing" Tor
connections (connect to a .onion address) by adding the
`--proxy:127.0.0.1:9050` option to the `lightningd`command.
Without a .onion address, the node won't be reachable through TOR by other nodes but it will
#### Case 1 c-lightning has a public IP address and no Tor hidden service address, but can connect to an onion address via a Tor socks 5 proxy.
be able to connect to a TOR enabled node, passing the `connect` request through the TOR service
socks5 proxy. When the TOR service starts it creates a socks5 proxy which is by default at the address
127.0.0.1:9050.
If you launch `lightningd` with the option `--proxy=127.0.0.1:9050` you will be able to
Without a .onion address, the node won't be reachable through Tor by other
connect to nodes with .onion address through the socks5 proxy.
nodes but it will always be able to `connect` to a Tor enabled node
(outbound connections), passing the `connect` request through the Tor
service socks5 proxy. When the Tor service starts it creates a socks5
proxy which is by default at the address 127.0.0.1:9050.
If you want to `connect` to nodes ONLY via the TOR proxy, you have to add `--always-use-proxy` option.
If the node is started with the option `--proxy=127.0.0.1:9050` the node
will be always able to connect to nodes with .onion address through the socks5
proxy.
**You can always add this option, also in the other use cases, to add outgoing
Tor capabilities.**
If you want to `connect` to nodes ONLY via the Tor proxy, you have to add the
`--always-use-proxy` option.
You can announce your public IP address through the usual method:
You can announce your public IP address through the usual method:
`--bind-addr=internalIPAddress:port --announce-addr=externalIpAddress`if the node is into an
`--bind-addr=internalIPAddress:port --announce-addr=externalIpAddress`if the
internal network
node is into an internal network
`--addr=externalIpAddress` if the node is not inside an internal network.
`--addr=externalIpAddress` if the node is not inside an internal network.
@ -186,12 +196,11 @@ In linux:
Discover your external IP address with: `curl ipinfo.io/ip`
Discover your external IP address with: `curl ipinfo.io/ip`
and your internal IP Address with: `p route get 1 | awk '{print $NF;exit}'`
and your internal IP Address with: `ip route get 1 | awk '{print $NF;exit}'`
If they match you can use the `--addr` command line option.
If they match you can use the `--addr` command line option.
#### Case #2 c-lightning has a public IP address and a fixed Tor hidden service address that is persistent, so that external users can connect to this node.
#### Case #2 c-lightning has a public IP address and a fixed TOR hidden service address that is persistent so that external users can connect to this node.
To have your external IP address and your .onion address announced, you use the
To have your external IP address and your .onion address announced, you use the
@ -199,50 +208,51 @@ To have your external IP address and your .onion address announced, you use the
If you are not inside an internal network you can use `--addr=yourIPAddress:port --announce-addr=your.onionAddress:port`.
If you are not inside an internal network you can use `--addr=yourIPAddress:port --announce-addr=your.onionAddress:port`.
your.onionAddress is the one created with the hidden service (see above).
your.onionAddress is the one created with the Tor hidden service ([see above](#creation-of-an-hidden-service-for-a-persistent-.onion-address)).
the port is the one indicated as the hidden service port. If the hidden service creation
The port is the one indicated as the hidden service port. If the hidden service creation
line is `HiddenServicePort 1234 127.0.0.1:9735` the .onion address will be reachable at
line is `HiddenServicePort 1234 127.0.0.1:9735` the .onion address will be reachable at
the 1234 port (the global port).
the 1234 port (the global port).
It will be possible to connect to this node with:
It will be possible to connect to this node with:
`lightning-cli connect nodeID .onionAddress globalPort` through TOR
`lightning-cli connect nodeID .onionAddress globalPort` through Tor
Where .onion address is in the form `xxxxxxxxxxxxxxxxxxxxxxxxxx.onion` Or
Where .onion address is in the form `xxxxxxxxxxxxxxxxxxxxxxxxxx.onion`, Or
`lightning-cli connect nodeID publicIPAddress Port` through clearnet.
`lightning-cli connect nodeID yourexternalIPAddress Port` through clearnet.
#### Case #3 c-lightning has a public IP address and a non persisten TOR service address
#### Case #3c-lightning has a public IP address and a non-persisten Tor service address
In this case other nodes can connect to you via Clearnet or TOR.
In this case other nodes can connect to you via Clearnet or Tor.
To announce your IP address to the network, you add:
To announce your IP address to the network, you add:
or `--addr=your.onionAddress:port` if you are NOT on an internal network.
or `--addr=your.onionAddress:port` if you are NOT on an internal network.
#### Case #5c-lightning has no public IP address, and has no fixed TOR hidden service address
#### Case #5 c-lightning has no public IP address, and has no fixed Tor hidden service address
In this case it is difficult to track the node.
In this case it is difficult to track the node.
You specify just:
You specify just:
@ -255,48 +265,51 @@ Other nodes will not be able to `connect` to you unless you communicate them how
You will find your .onion address with the command `lightning-cli getinfo` and the other nodes will
You will find your .onion address with the command `lightning-cli getinfo` and the other nodes will
be able to connect to it through the 9735 port.
be able to connect to it through the 9735 port.
#### Case #6 c-lightning has a public IP address and a fixed TOR V3 service address and a TOR V2 service address
#### Case #6 c-lightning has a public IP address and a fixed Tor V3 service address and a Tor V2 service address
You will be reachable via Clearnet, via TOR to the .onion V3 address and the .onion V2 address if this
last is communicated to the node that wants to connect with our node.
Once the .onion addresses have been created with the procedures oulined above,
to make your external IP address public you add: `--bind-addr=yourInternalAddress:port --announce-addr=yourexternalIPAddress:port`
To make your external .onion addresses public you add: `--bind-addr=yourInternalIPAddress:port --announce-addr=yourexternalIPAddress:port --announce-addr=.onionAddressV2:port --announce-addr=.onionAddressV3:port`
You will be reachable via Clearnet, via Tor to the .onion V3 address and the
.onion V2 address if this last is communicated to the node that wants to
If the node is not on an internal network the option will be:
`--addr=yourexternalIPAddress:port`.
#### Case #7 c-lightning has no public IP address and a fixed TOR V3 service address and fixed TOR V2 service address a 3rd non persisten V2 address
Once the .onion addresses have been created with the procedures [oulined above](#creation-of-an-hidden-service-for-a-persistent-.onion-address),
the node is already reachable at the .onion address.
External users can connect to this node by TOR V2 and V3 and a random V2 until next tor release, then also (V3 randomly).
To make your external .onion addresses public you add: `--announce-addr=.onionAddressV2:port --announce-addr=.onionAddressV3:port` to the options to publish your IP number.
The Persistent addresses can be created with the steps outlined above.
#### Case #7 c-lightning has no public IP address and a fixed Tor V3 service address and fixed Tor V2 service address a 3rd non persisten V2 address
You are not obliged to announce the non persistent V2 address but if want to do it:
External users can connect to this node by Tor V2 and V3 and a random V2 until next tor release, then also (V3 randomly).
`--addr=autotor:<torservice_ip:port>`
The Persistent addresses can be created with the steps [outlined above](#creation-of-an-hidden-service-for-a-persistent-.onion-address).
and also you must specify `--tor-service-password=yourpassword` (not the hash) to access the
To create your non-persistent Tor address, add
`--addr=autotor:127.0.0.1:9051` if you want to announce it or
`--bind-addr=autotor:127.0.0.1:9051` if you don't want to announce it.
tor service at 9051 If you have protected them with the password (no additional options if
Also you must specify `--tor-service-password=yourpassword` (not the hash) to access the
they are protected with a cookie file. See above.).
Tor service at 9051 If you have protected them with the password (no additional options if
they are protected with a cookie file. [See above](#creation-of-an-auto-service-for-non-persistent-.onion-addresses)).
To make your external .onion address (V2 and V3) public you add: `--bind-addr=yourInternalIPAddress:port --announce-addr=your.onionAddressV2:port --announce-addr=your.onionAddressV3:port`
To make your external .onion address (V2 and V3) public you add: `--bind-addr=yourInternalIPAddress:port --announce-addr=your.onionAddressV2:port --announce-addr=your.onionAddressV3:port`
NOTE: if you want both of them public you can repeat the --announce-addr option. If your node is NOT inside an internal network you can use `--addr=external` instead.
#### Case #8 c-lightning has a public IP address and no Tor addresses