[root@dev ~]# mongo -u "client_read" -p 123 192.168.105.54/admin
Error: couldn't connect to server 192.168.105.54:27017, connection attempt failed: SocketException: Error connecting to 192.168.105.54:27017 :: caused by :: No route to host :
connect@src/mongo/shell/mongo.js:356:17
@(connect):2:6
exception: connect failed
mongosh -u poolrw -p RBgCNw^S6A9 192.168.103.204/pool18
sudo firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="192.168.103.207" port protocol="tcp" port="27017" accept'
nc -zv 192.168.103.208 27017
sudo firewall-cmd --reload
mongo -u poolrw -p RBgCNw^S6A9 192.168.103.207/pool18
db.changeUserPassword("poolrw", "RBgCNw^S6A9")
db.createUser({
user: "poolrw",
pwd: "RBgCNw^S6A9",
roles: [{ role: 'readWrite', db:'pool18'}]
})
db.createUser({
user:"
poolrw",
pwd:"RBgCNw^S6A9",
roles:[
{
role:"readWrite",
db:"
pool18"
}
],
mechanisms:[
"SCRAM-SHA-1"
]
})
523 mongo524 mongosh -u poolrw -p RBgCNw^S6A9 192.168.103.204/pool18
525 mongo -u poolrw -p RBgCNw^S6A9 192.168.103.204/pool18
526 firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="192.168.103.207" port protocol="tcp" port="27017" accept'
527 systemctl restart firewalld.service
528 firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="192.168.103.208" port protocol="tcp" port="27017" accept'
529 mongo -u poolrw -p RBgCNw^S6A9 192.168.103.208/pool18
530 systemctl restart firewalld.service
531 nc -zv 192.168.103.208 27017
532 ip address
533 firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="192.168.103.208" port protocol="tcp" port="27017" accept'
534 mongo
535 netstat --tnlp
536 netstat -tnlp
537 mongo -u poolrw -p RBgCNw^S6A9 127.0.0.1/pool18
538 mongo
539 mongosh -u poolrw -p RBgCNw^S6A9 192.168.103.204/pool18
540 mongo -u poolrw -p RBgCNw^S6A9 192.168.103.204/pool18
541 mongo -u poolrw -p RBgCNw^S6A9 192.168.103.208/pool18
542 systemctl restart mongod.service
543 mongo -u poolrw -p RBgCNw^S6A9 192.168.103.208/pool18
544 mongo -u poolrw -p RBgCNw^S6A9 127.0.0.1/pool18
545 db
546 mongo
547 mongo -u poolrw -p RBgCNw^S6A9 127.0.0.1/pool18
548 firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="192.168.103.208" port protocol="tcp" port="27017" accept'
549 systemctl restart mongod.service
550 mongo -u poolrw -p RBgCNw^S6A9 127.0.0.1/pool18
551 mongo -u poolrw -p RBgCNw^S6A9 192.168.103.208/pool18
552 nc -zv 192.168.103.208 27017
553 vim /etc/mongod.conf
554 systemctl restart mongod.service
555 nc -zv 192.168.103.208 27017
556 mongo -u poolrw -p RBgCNw^S6A9 192.168.103.208/pool18
557 firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="192.168.103.208" port protocol="tcp" port="27017" accept'
558 sudo ufw allow 27017
559 netstat -an | grep 27017
560 service mongod stop
561 service mongod start
562 sudo netstat -plunt | grep mongo
563 systemctl stop firewalld.service
564 mongo -u poolrw -p RBgCNw^S6A9 192.168.103.208/pool18
565 mongo
566 mongo -u poolrw -p RBgCNw^S6A9 192.168.103.208/pool18
567 mongo -u poolrw -p RBgCNw^S6A9 192.168.103.278/pool18
568 mongo -u poolrw -p RBgCNw^S6A9 192.168.103.207/pool18
569 mongo -u poolrw -p RBgCNw^S6A9 192.168.103.204/pool18
570 mongo -u poolrw -p RBgCNw^S6A9 192.168.103.208/pool18
571 int 6
572 init 6
573 mongo -u poolrw -p RBgCNw^S6A9 192.168.103.208/pool18
574 mongo
575 history
No comments:
Post a Comment