I created 2 VMs (CentOS6.5) on Windows Azure for Postgresql database and HA cluster, everything works fine except when I set iptables service on, the endpoint load-balanced set is down.
for security issue, I blocked all input access except trust domain and intranet.
:INPUT DROP [1:40]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [1:152]
-A INPUT -i lo -j ACCEPT
-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -s myTrustDomain.cloudapp.net -j ACCEPT
I'm pretty sure the problem comes from firewall because once I turn iptables service off, all client will be able to connect to port 5432. but I really need load-balanced set endpoint to switch node when one of them goes down in HA cluster.
Does anyone know how to configure firewall properly when I use load-balanced set endpoint?