From 7512ccc2f05ea93191db0dd35967d119db967d04 Mon Sep 17 00:00:00 2001 From: Mayank Date: Fri, 26 Jun 2020 11:32:34 +0530 Subject: [PATCH 1/9] Use Tor image --- build/tor/Dockerfile | 10 ---------- docker-compose.yml | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 build/tor/Dockerfile diff --git a/build/tor/Dockerfile b/build/tor/Dockerfile deleted file mode 100644 index 14077db..0000000 --- a/build/tor/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM alpine:3.11 - -RUN apk add --no-cache tor - -VOLUME /etc/tor/ -VOLUME /var/lib/tor/ - -EXPOSE 9050 9051 29050 29051 - -ENTRYPOINT ["tor"] diff --git a/docker-compose.yml b/docker-compose.yml index aadd61d..afbbf3c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ x-utility: &default-utility services: tor: - build: ${PWD}/build/tor/ + image: getumbrel/tor:v0.4.1.9 restart: on-failure logging: *default-logging volumes: From 14148c7e28431302b5b092cdcb59c84bbcb80592 Mon Sep 17 00:00:00 2001 From: Mayank Date: Fri, 26 Jun 2020 11:35:52 +0530 Subject: [PATCH 2/9] Pull images and use Tor container to hash password --- configure-box.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/configure-box.sh b/configure-box.sh index 953a21c..caa81ed 100755 --- a/configure-box.sh +++ b/configure-box.sh @@ -70,12 +70,17 @@ if [ -z $TESTNET ] && [ -z $REGTEST ]; then echo "Setting mainnet RPC port in docker-compose" sed -i 's/RPCPORT/18443/g; ' docker-compose.yml fi + +echo "Pulling Docker images" +docker-compose pull + echo "Adding tor password" -SAVE_PASSWORD=`tor --hash-password "${RPCPASS}"` +SAVE_PASSWORD=`docker run -it getumbrel/tor --quiet --hash-password "${RPCPASS}"` echo "HashedControlPassword ${SAVE_PASSWORD}" >> tor/torrc -echo "Configuring bitcoind" + +echo "Adding Tor password to bitcoind" sed -i "s/torpassword=umbrelftw/torpassword=${RPCPASS}/g;" bitcoin/bitcoin.conf -echo "Configuring LND" +echo "Adding Tor password to LND" sed -i "s/tor.password=umbrelftw/tor.password=${RPCPASS}/g; " lnd/lnd.conf rm configure-box.sh From 8f063017b1c8d8dd467d745645d2002acc954a69 Mon Sep 17 00:00:00 2001 From: Mayank Date: Fri, 26 Jun 2020 11:42:13 +0530 Subject: [PATCH 3/9] Removed pre-defined Tor password --- configure-box.sh | 2 +- tor/torrc | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/configure-box.sh b/configure-box.sh index caa81ed..c1d37e6 100755 --- a/configure-box.sh +++ b/configure-box.sh @@ -75,7 +75,7 @@ echo "Pulling Docker images" docker-compose pull echo "Adding tor password" -SAVE_PASSWORD=`docker run -it getumbrel/tor --quiet --hash-password "${RPCPASS}"` +SAVE_PASSWORD=`docker run -it getumbrel/tor:v0.4.1.9 --quiet --hash-password "${RPCPASS}"` echo "HashedControlPassword ${SAVE_PASSWORD}" >> tor/torrc echo "Adding Tor password to bitcoind" diff --git a/tor/torrc b/tor/torrc index 9d75239..44a740e 100644 --- a/tor/torrc +++ b/tor/torrc @@ -1,6 +1,3 @@ # Bind only to "10.11.5.1" which is the tor IP within the container SocksPort 10.11.5.1:29050 ControlPort 10.11.5.1:29051 - -# Tor Passwords -HashedControlPassword 16:50A873DF18C00F4A6048BF1CEF7E7AA66478F0B5134DA4369D80657F26 From 1bba9bf7ecc2a9109c37fea6e406a2796ea44d24 Mon Sep 17 00:00:00 2001 From: Mayank Date: Fri, 26 Jun 2020 11:44:12 +0530 Subject: [PATCH 4/9] Terminate script on error --- configure-box.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure-box.sh b/configure-box.sh index c1d37e6..9990822 100755 --- a/configure-box.sh +++ b/configure-box.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF From f6429612bf412245a10ccabaec6350532d61162b Mon Sep 17 00:00:00 2001 From: Mayank Date: Fri, 26 Jun 2020 11:48:29 +0530 Subject: [PATCH 5/9] Terminate install script on error --- install-box.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-box.sh b/install-box.sh index 62aa029..16be67b 100644 --- a/install-box.sh +++ b/install-box.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash -e # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF From 088e4a338382d2dcded551438b8ea977c4378a7e Mon Sep 17 00:00:00 2001 From: Mayank Date: Fri, 26 Jun 2020 11:50:27 +0530 Subject: [PATCH 6/9] Remove build container --- build/volume-permissions/Dockerfile | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 build/volume-permissions/Dockerfile diff --git a/build/volume-permissions/Dockerfile b/build/volume-permissions/Dockerfile deleted file mode 100644 index 77cc99d..0000000 --- a/build/volume-permissions/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -ARG IMG -ARG VER - -FROM ${IMG}:${VER} - -ARG ID=1000 -ARG DIR=/data/ - -RUN addgroup --gid ${ID} lncm - -RUN adduser --uid ${ID} \ - --home ${DIR} \ - --disabled-password \ - --gecos "" \ - --ingroup lncm \ - lncm - -USER lncm - -VOLUME ${DIR} - From a7e6614d4dfe81bc582d04a35f4c2a39f8e9b2f3 Mon Sep 17 00:00:00 2001 From: Mayank Date: Fri, 26 Jun 2020 11:56:40 +0530 Subject: [PATCH 7/9] Comment out tls options for lnd --- lnd/lnd.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lnd/lnd.conf b/lnd/lnd.conf index 485288e..ad554bc 100644 --- a/lnd/lnd.conf +++ b/lnd/lnd.conf @@ -16,10 +16,10 @@ accept-keysend=true [Routing] routing.assumechanvalid=1 ; Extra TLS -tlsextradomain=lnd -tlsextraip=10.11.1.2 +; tlsextradomain=lnd +; tlsextraip=10.11.1.2 ; Unsure if this is a 0.10.0 command (make mental note to test this) -tlsautorefresh=1 +; tlsautorefresh=1 ; Add external address for TLS ;externalip=externaladdress From 5db6f4ec9ed3f8141abce426471162759c0a99fb Mon Sep 17 00:00:00 2001 From: Mayank Date: Mon, 29 Jun 2020 09:22:56 +0530 Subject: [PATCH 8/9] Uncomment tlsautorefresh --- lnd/lnd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnd/lnd.conf b/lnd/lnd.conf index ad554bc..2d5350a 100644 --- a/lnd/lnd.conf +++ b/lnd/lnd.conf @@ -19,7 +19,7 @@ routing.assumechanvalid=1 ; tlsextradomain=lnd ; tlsextraip=10.11.1.2 ; Unsure if this is a 0.10.0 command (make mental note to test this) -; tlsautorefresh=1 +tlsautorefresh=1 ; Add external address for TLS ;externalip=externaladdress From 5309aca0ec13f2e4c81560565b197f1ae9e8ceac Mon Sep 17 00:00:00 2001 From: Mayank Date: Fri, 3 Jul 2020 12:16:48 +0530 Subject: [PATCH 9/9] Requested changes --- lnd/lnd.conf | 4 ++-- tor/torrc | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lnd/lnd.conf b/lnd/lnd.conf index 2d5350a..485288e 100644 --- a/lnd/lnd.conf +++ b/lnd/lnd.conf @@ -16,8 +16,8 @@ accept-keysend=true [Routing] routing.assumechanvalid=1 ; Extra TLS -; tlsextradomain=lnd -; tlsextraip=10.11.1.2 +tlsextradomain=lnd +tlsextraip=10.11.1.2 ; Unsure if this is a 0.10.0 command (make mental note to test this) tlsautorefresh=1 ; Add external address for TLS diff --git a/tor/torrc b/tor/torrc index 44a740e..3c12312 100644 --- a/tor/torrc +++ b/tor/torrc @@ -1,3 +1,6 @@ # Bind only to "10.11.5.1" which is the tor IP within the container SocksPort 10.11.5.1:29050 ControlPort 10.11.5.1:29051 + +# Tor Passwords +HashedControlPassword 16:50A873DF18C00F4A6048BF1CEF7E7AA66478F0B5134DA4369D80657F26 \ No newline at end of file