Deploy zerotier-3 on DO

Changes the firewall config to allow the control UI to be reached from
all connected networks.
This commit is contained in:
2022-02-10 15:34:28 -06:00
parent a1f723d52e
commit 935eff3b84
4 changed files with 80 additions and 7 deletions

View File

@@ -28,11 +28,13 @@ end
include_recipe 'kosmos-base::firewall'
if node['ztncui']['http_allow_access_from']
firewall_rule 'zncui_http' do
port 3000
protocol :tcp
command :allow
source node['ztncui']['http_allow_access_from']
if ip_addresses = node['ztncui']['http_allow_access_from']
ip_addresses.each_with_index do |ip_address, i|
firewall_rule "zncui_http_#{i}" do
port 3000
protocol :tcp
command :allow
source ip_address
end
end
end