Hi @Kish_V,
Can you ssh to the primary node and provide the rs.status() and rs.conf()?
If the rs.conf is with internal ips the mongo shell will try to reach those.
Also can you try to connect to a single host without all replica configuration. Just by specifying a single --host and --port.
Also please run a telnet dns port for all 3 hosts
Best
Pavel