Connect mongodb 4.0 with robomongo
First, make sure the MongoDB service is running in the remote machine.

Next, check if the MongoDB port is open to the outside network or not.

The following will help you check if the 27017 is accessible from an outside machine.

nmap -Pn 13.56.140.11


If the port is not enabled, use the following command to expose the port.

sudo iptables -I INPUT -p tcp -s 0.0.0.0/0 --dport 27017 -j ACCEPT