Closed alstr closed 4 years ago
Having done some further research, it seems like it is potentially retrieving the IP address of the load balancer. The actual IP seems to be in HTTP_X_FORWARDED_FOR
rather than REMOTE_ADDR
.
@alstr Hello! You'll need a middleware to assign the IP address. There's an example in the docs:
Ah yes, that should sort it. Thanks!
Hi Derek,
thanks for your work and time.
I was wondering if you can share a full example of this code and what I mean by that is to what exactly do we have to set in the middlewares section in settings? Does this class (class RemoteAddrMiddleware(object)) have to be in views.py file or somewhere else?
Thanks, Rainer
Hello all :wave:.
I've been using a forked version of this in an app running on Google App Engine. It has a custom runtime specfied by a Dockerfile. Every login attempt at the honeypot site is said to originate from 172.17.0.6, which seems to be an infrastructure-related IP, rather than the user's IP.
The changes I made in the forked version shouldn't be a factor, so I was wondering if anyone had any thoughts?