Trouble connecting to my DB in Compass

I get this error in Compass querySrv EREFUSED I whitelisted my IP address. User name and password were entered correctly. How to fix this?

Are you able to connect by shell?
Have you added correct IP in whitelist
If any VPN/firewall preventing your connection

I have mongo shell installed and when I paste the connection string in cmd it says:
DNSHostNotFound: Failed to look up service "":DNS operation refused.

Also, I’ve whitelisted it to access from anywhere, which includes my IP address.

I don’t have any VPN installed.

The thing is yesterday, it was working fine and Ive not installed any new software till now to suspect that might have caused it.

It really has to be something local as the DNS information is correct as:

;; ANSWER SECTION: 59	IN SRV 0 0 27017 59	IN SRV 0 0 27017 59	IN SRV 0 0 27017

If you can change the DNS resolver try with and They are the google’s public DNS server.