• Is there a log anywhere admin can view of IP addresses of site visitors.
    Like if people view page as guest, is there any log of this?

  • Community Rep

    Such should be available from your web server logs, e.g. /var/log/nginx/access.log

    From within NodeBB ACP, you may access error logs, but reproducing everything that comes in would be redundant and more efficiently handled by the web server.

    You may, however, enable IP logging for individual posts NodeBB ACP side if you are simply trying to track "bad actors" for black listing purposes. ACP->settings/post#ip-tracking

    HTH- Have fun! 🐕

  • GNU/Linux Admin

    @eveh we store the recently seen IPs in the sorted set ip:recent, although this is not exposed anywhere in the frontend.


  • @julian just out of interest whats easiest way to view this?
    Im hosting on my own server, Im guessing this list is stored in the mongoDB?
    I dont know much about databases, if you could tell me which tool I can use to inspect the database manually I will experiment

  • NodeBB Admin

    If you have access to your database you can see it in the CLI, the commands are

    mongo
    use <database name>
    db.objects.find({_key: "ip:recent"});
    

  • @baris
    Thanks, that worked, well it gave me a list of
    { "_id" : ObjectID("634....."), "key" : "ip:recent", "value" : "3ab6a...long.....", "score" : 1665...}
    But the value: (^..long) seems to be a Hash!
    Would the IP records be stored in the db as hashed??

  • NodeBB Admin

    Ahh I think @julian at somepoint hashed those values so the real IPs aren't visible. Not sure if it was due to GDPR.

  • GNU/Linux Admin

    Oh... yes, that's true... they are hashed for privacy because if the database were leaked, some could argue that an IP address is considered PII.

    In that case then I don't think we store a list of recent IP addresses.


Suggested Topics

| | | |