Let's start building our cloud with virtual machines. You could use bare-metal machines as well, the configuration would be the same. Given that most readers (myself included) will be using virtual infrastructure, from now on I'll be referring strictly to VMs.
This is a companion discussion topic for the original entry at https://geek-cookbook.funkypenguin.co.nz/ha-docker-swarm/vms/
Hi , I have 3 VPS with random static public IP’s (174.93.50.XX , 174.93.51.XX , 103.225.228.XXX) running Ubuntu 16.04 . Can you please help me with this?
#Allow all inter-node communication
-A INPUT -s 192.168.31.0/24 -j ACCEPT
Assuming the public IPs won’t change, you could try this:
#Allow all inter-node communication
-A INPUT -s 174.93.50.XX -j ACCEPT
-A INPUT -s 174.93.51.XX -j ACCEPT
-A INPUT -s 103.225.228.XX -j ACCEPT
You’d want to lock this down to the individual IPs of each node though, it seems unnecessarily dangerous to permit access from anybody else’s VPS 
D