Shell script `default/remove-server-disallow-mix-ip'

UFW disallow connection from removed server's private IP address if in the same datacenter or public IP otherwise.

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