Shell script `default/add-server-allow-mix-ip'

UFW allow connection from new server's public IP as well as private IP address if in the same datacenter.

echo 'Allow connections from new server' {{ targetServer.name }} 'with public IP' {{ targetServer.publicIp }} sudo ufw allow from {{ targetServer.publicIp }} {% if targetServer.location == server.location %} echo 'Allow connections from new server' {{ targetServer.name }} 'with private IP' {{ targetServer.privateIp }} sudo ufw allow from {{ targetServer.privateIp }} {% endif %}