Iptables blocking access to atlas cluster

I’m trying to connect with my mongodb atlas cluster, but the firewall from my VPS is blocking the connection, i’ve added some rules into the firewall to open the ports 27017, 27018 and 27019, with the following commands on prompt:

iptables -A INPUT -s <ip-address> -p tcp --destination-port <port> -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -d <ip-address> -p tcp --source-port <port> -m state --state ESTABLISHED -j ACCEPT
iptables -A INPUT -s <ip-address> -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -d <ip-address> -p tcp -m state --state ESTABLISHED -j ACCEPT
iptables -A INPUT -s <vps-public-ip-address> -p tcp --destination-port <port> -m state --state NEW,ESTABLISHED -j ACCEPT
sudo service iptables save
iptables-save > /etc/iptables.conf
sudo service iptables restart

Where the ip-address is the ip from the 3 shards of the cluster (shard-00-00, shard-00-01 and shard-00-02). I still can’t connect to the atlas cluster.
My VPS uses CentOS 6. If i flush all rules with iptables -F my app wich is made in node js connects with the mongodb atlas.
I Hope that someone can help me with this problem.