Welcome to the MongoDB Community @ra_rahim !
The hostnames you have provided all appear to be resolvable. If this was a newly created cluster, it is possible the hostnames have not propagated to your local DNS servers yet.
If possible I would try using different name servers, for example Google Public DNS.
The mongodb+srv
connection string format uses SRV and TXT records to discover the cluster hostnames and connection settings. For more background, see MongoDB 3.6: Here to SRV you with easier replica set connections | MongoDB.
This is correct for any of the hostnames in your replica set. You need to use the Atlas hostnames (and ideally, the SRV url) to connect to your cluster.
Google Public DNS is generally a good starting point.
This suggestion incorrectly assumes that an SRV hostname will have an A record (it will not, as above).
One of my colleagues wrote a small tool to try to help checking Atlas connections. I suggest trying to run this from your host server environment: GitHub - pkdone/mongo-connection-check: Tool to check the connectivity to a remote MongoDB deployment, providing advice if connectivity is not achieved.
For an Atlas replica set, you will only need access to port 27017. Port 27016 is used for sharded clusters and port 27015 for the MongoDB Connector for BI. For a reference, please see Attempting to connect to an Atlas deployment from behind a firewall.
Regards,
Stennie