From 6c6026958badaeea2f002a18b486fafc52e01c9f Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Thu, 14 Jan 2021 21:23:03 +0100 Subject: [PATCH 1/2] Fix typo in port number of externalip config --- site-cookbooks/kosmos-bitcoin/attributes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site-cookbooks/kosmos-bitcoin/attributes/default.rb b/site-cookbooks/kosmos-bitcoin/attributes/default.rb index dc11a70..b595fb7 100644 --- a/site-cookbooks/kosmos-bitcoin/attributes/default.rb +++ b/site-cookbooks/kosmos-bitcoin/attributes/default.rb @@ -42,7 +42,7 @@ node.default['lnd']['alias'] = 'ln2.kosmos.org' node.default['lnd']['color'] = '#5e0c99' node.default['lnd']['log_level'] = 'info' node.default['lnd']['public_ip'] = '148.251.237.111' -node.default['lnd']['public_port'] = '9375' +node.default['lnd']['public_port'] = '9735' node.default['lnd']['port'] = '9736' node.default['lnd']['minchansize'] = '1000000' node.default['lnd']['basefee'] = '500' From 775ec691efcd0fc230fb454e80506218471e4ce0 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Thu, 14 Jan 2021 21:23:20 +0100 Subject: [PATCH 2/2] Add firewall rules for LND and c-lightning --- site-cookbooks/kosmos-bitcoin/recipes/c-lightning.rb | 6 ++++++ site-cookbooks/kosmos-bitcoin/recipes/lnd.rb | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/site-cookbooks/kosmos-bitcoin/recipes/c-lightning.rb b/site-cookbooks/kosmos-bitcoin/recipes/c-lightning.rb index b86b184..b8f2865 100644 --- a/site-cookbooks/kosmos-bitcoin/recipes/c-lightning.rb +++ b/site-cookbooks/kosmos-bitcoin/recipes/c-lightning.rb @@ -92,3 +92,9 @@ systemd_unit 'lightningd.service' do triggers_reload true action [:create, :enable, :start] end + +firewall_rule 'lightningd' do + port [9735] # TODO use attribute + protocol :tcp + command :allow +end diff --git a/site-cookbooks/kosmos-bitcoin/recipes/lnd.rb b/site-cookbooks/kosmos-bitcoin/recipes/lnd.rb index b179c42..4e2464a 100644 --- a/site-cookbooks/kosmos-bitcoin/recipes/lnd.rb +++ b/site-cookbooks/kosmos-bitcoin/recipes/lnd.rb @@ -89,3 +89,9 @@ systemd_unit 'lnd.service' do triggers_reload true action [:create, :enable, :start] end + +firewall_rule 'lnd' do + port [node['lnd']['port']] + protocol :tcp + command :allow +end