jerry
Retrieve remote IP address in a reverse proxy setup
Good day to you all.
I need assistance on an issue I am faced with.
I have an nginx reverse proxy, behind which is an Elixir application.
The challenge I have is that the only IP reaching the Elixir application is the local IP of the server on which the nginx reverse proxy resides.
Is there a way I can retrieve the remove IP address of the client application.
I need it to be able to secure my platform and only allow IPs whitelisted in my database.
I would be most grateful for your response.
Thanks.
Jerry
Most Liked
LostKobrakai
shanesveller
Making authz/authn decisions based only on client IP is extremely fraught with peril, so please be sure to continue to follow good practices and use a strong credential model as well. Treat client IP as something that can only deny access on a mismatch, rather than something that can allow access on a successful match.
I’ve seen another similar practice where organizations consider your ability to connect to the application, by being on VPN or otherwise being allowed through network-level whitelists, to be sufficient security, and in most cases this is both lazy and unsafe.
nesimtunc
That was so complex. I checked out how Plausible Analytics how manage it and it’s super easy!
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









