Segments behind firewalls

How do I configure settings for cluster nodes so connections to local nodes are done by LAN address and to external ones by WAN?
All my servers in different datacenters have only local IP addresses and have ports forwarded from outside via firewall.
Thank you.

You need a dedicated IP for each node in the cluster. You can join multiple WAN locations using VPN, so that one private network can see the other one using original IP addresses.