我尝试远程连接到mongo数据库
mongod.conf
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
net:
port: 27017
bindIp: xxx.xxx.130.13
processManagement:
timeZoneInfo: /usr/share/zoneinfo
我使用ufw但不能正常工作
root@localhost:~# sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip
To Action From
-- ------ ----
22/tcp ALLOW IN Anywhere
27017 ALLOW IN Anywhere
27017 (v6) ALLOW IN Anywhere (v6)
22/tcp (v6) ALLOW IN Anywhere (v6)
我使用sudo nmap -p27017 xxx.xxx.130.13的nmap 日志是
PORT STATE SERVICE
27017/tcp closed mongod
and add sudo ufw allow from xxx.xxx.220.153 ----> other server
有什么主意吗?问候!