Asi
Asi

Reputation: 126

How to see the IP of Unauthorized Access in MongoDB

Recently implemented user/pass authentication on a MongoDB server.

How can I see the IP of incoming & Unauthorized traffic? Is there a way to tell the IP of a connection (e.g. con904555) or other Unauthorized traffic?

# log example:
2020-06-11T10:29:03.966-0700 I ACCESS   [conn904555] Unauthorized: not authorized on deadline10db to execute command { find: "CloudRegion", ...
2020-06-11T11:11:58.273-0700 I ACCESS   [conn913859] Unauthorized: not authorized on deadline10db to execute command { find: "CloudRegion", ...

Using MongoDB 3.4.10 in a mostly Linux environment.

Thank you!

Upvotes: 0

Views: 77

Answers (1)

D. SM
D. SM

Reputation: 14480

This information is in the server log.

2020-06-11T18:14:57.332-0400 I NETWORK  [conn10] received client metadata from 127.0.0.1:49580 conn10: { driver: { name: "PyMongo", version: "3.10.1" }, os: { type: "Linux", name: "Ubuntu 18.04 bionic", architecture: "x86_64", version: "4.15.0-96-generic" }, platform: "CPython 2.7.17.final.0", application: { name: "mlaunch v1.5.5" } }

Upvotes: 1

Related Questions