Hi Sri,
I'm not as familiar with Redshift as I am with Synapse, but in general when I've seen database connection errors like this it is usually because of a permissions issue on the target database. It looks like the AWS docs also suggest this as a probably cause of the error: https://docs.aws.amazon.com/redshift/latest/mgmt/connecting-refusal-failure-issues.html
If you need Synapse's outbound IP address list, the latest list is available here by region. It is better to use the subnets instead of specific IP addresses so you won't have to update your firewall if a particular gateway is updated to a new IP. https://learn.microsoft.com/en-us/azure/azure-sql/database/connectivity-architecture#gateway-ip-addresses
Please let me know if this helps to resolve your error.