title: Firewalld Configuration on Centos 7.2
body: <p>I have installed <strong>MongoDB</strong> on my <strong>CentOS 7.2</strong> VPS and trying to access to the DB via Robomongo from my client. However, when I try to connect the server from the <strong>27017</strong> port, I get "<strong>Network is unreachable</strong>" error.</p>
  
  <p>I have enabled the <strong>firewalld</strong> on the server and added an exception for <strong>27017</strong> port.</p>
  
  <pre><code>firewall-cmd --list-all
  </code></pre>
  
  <p>Result:</p>
  
  <p><a href="https://i.stack.imgur.com/35AJK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/35AJK.png" alt="Result:"></a></p>
  
  <p><em>I got this result after I've permanently added the exception and reloaded the firewalld via --reload.</em></p>
  
  <p>When I query the port by using:</p>
  
  <pre><code>firewall-cmd --query-port=27017/tcp
  </code></pre>
  
  <p>I get a "<strong>yes</strong>" from the system. However when I try to connect via Robomongo or query the port via a port checker service like <a href="http://ping.eu/port-chk/" rel="nofollow noreferrer">http://ping.eu/port-chk/</a> I get a negative result. </p>
  
  <p>Do you have any suggestions regarding to my case?</p>
  
  <p>Thank you.</p>