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:
@@ -3,4 +3,4 @@ node.default['kosmos_zerotier']['server_port'] = 9993
|
||||
node.default['ztncui']['version'] = '0.6.6'
|
||||
node.default['ztncui']['checksum'] = 'fa83679266a571c10e13b11293ebfb9d1c3515019f2af1e7dd066b5a37411018'
|
||||
node.default['ztncui']['http_all_interfaces'] = true
|
||||
node.default['ztncui']['http_allow_access_from'] = '10.1.1.0/24'
|
||||
node.default['ztncui']['http_allow_access_from'] = ['10.1.1.0/24','10.2.2.0/24']
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user