If this was an authentication issue it would say it in the error. I can only tell you how to check your firewall conf if i know the OS you are using.
You need to check the inbound firewall rules on the server with mongodb, aka the server you are connecting to. If it is a systemd based OS (e.g RHEL/Centos) do a firewall-cmd --list-all-zones otherwise use iptables -L (i think, been a while since i used iptables)