Skip to content

Instantly share code, notes, and snippets.

@aNd1coder
Created September 12, 2016 09:56
Show Gist options
  • Save aNd1coder/c88c928a54bc865d76dd61850f4ef28f to your computer and use it in GitHub Desktop.
Save aNd1coder/c88c928a54bc865d76dd61850f4ef28f to your computer and use it in GitHub Desktop.
远程连接mongodb时,27017端口连接不上的解决办法
# 开放 27017 端口访问
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 27017 -j ACCEPT
# 修改 mongod.conf 端口绑定
bindIp: 0.0.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment