Ports on replca set

Hi! I’m plannig to deploy a replica set of 3 nodes on different machines (different ips)

It’s necesary to open (expose) the mongodb port on the firewall before connecting the nodes? anyone knows how to do that correctly?

thanks
Andres

Hi @andres_cozme,

Members of your replica set will need to be able to communicate with each other on the configured hostname/IPs and ports.

Firewall configuration will depend on your O/S and network. There are some example configurations for Linux and Windows in the MongoDB manual: Network Hardening - Firewalls.

I recommend reviewing the MongoDB Security Checklist for more available security measures.

Regards,
Stennie

Hi Stennie, thankks for que quick reply.

The installer opens the default port(27017) on the firewall when it install for the first time? Or it’s neccesary to open it mannually?

thanks