title: Router cannot connect to MongoDB cluster
body: <p>I am working on a MERN project. I was previously able to connect to the MongoDB cluster via the connection string in my node application. A few days ago I changed my wifi router and I am not able to connect to the database anymore.</p>
  <p>I am sure the problem is the <a href="https://studio3t.com/knowledge-base/articles/mongodb-atlas-login-ip-whitelisting#router-settings" rel="nofollow noreferrer">router</a> because when I connect through my phone's internet, the connection is successful. Unfortunately, I cannot use my phone's internet always as it is really expensive.</p>
  <p>I have tried to factory reset my router as suggested in this question.</p>
  <p><a href="https://stackoverflow.com/questions/49894913/error-at-connecting-to-mongodb-atlas-server/55665459#answer-57333446">Error at connecting to MongoDb Atlas Server</a></p>
  <p>I have also tried to enable port forwarding for port 27017, 27018, 27019 (default ports of MongoDB) through the router settings as suggested by someone on the internet.</p>
  <p><a href="https://i.stack.imgur.com/wZ1CD.png" rel="nofollow noreferrer">Screenshot of my router settings</a></p>
  <p>But did not face any success.</p>
  <p>Some additional information. I am using a d-link router(DIR-819). The latest version of windows, node.js at the time of asking this question. Any help would be greatly appreciated as I am stuck on this problem for hours now.</p>
  <p>EDIT: Here is the output when I try connecting through the shell.
  DNSHostNotFound: Failed to lookup service &quot;: This operation returned because the timeout period expired.
  try 'mongo --help' for more information.
  Please help me out, guys.
  I have whitelisted all the IP addresses.</p>
  <p>Cheers Everyone</p>