I am using a Rails 4 application, when in production mode i am getting
same IP address for all the members of the same organisation. The
requirement is to get different IP address for each member so as to
uniquely identify each system.

request.remote_ip
request.env['HTTP_X_REAL_IP']
request.env["HTTP_X_FORWARDED_FOR"]

All these fetches me the same IP for each system. How can i uniquely
identify each system? Please help.

Thanks and Regards,
Toby

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d76f84dd86af0410856871f25955b7e5%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Hassan Schroeder at Feb 13, 2016 at 6:07 pm

    On Sat, Feb 13, 2016 at 2:14 AM, Toby Joy wrote:
    I am using a Rails 4 application, when in production mode i am getting
    same IP address for all the members of the same organisation.
    What does the "same IP address" belong to?

    What app server are you using? Do you have a proxy in front of it
    (e.g. nginx, Apache httpd)? If so, show the relevant configuration.

    --
    Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
    http://about.me/hassanschroeder
    twitter: @hassan
    Consulting Availability : Silicon Valley or remote

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yCAAs8abiTFAmvXkk4RDJhNLtVCjT_BVT4ABGXXfK3kDw%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • Mike at Feb 14, 2016 at 10:43 am
    If this is an application on the Internet, it is perfectly possible that you will see one IP, an most organisations traffic is natted these days

    I guess you could use some form of JavaScript trickery to retrieve information from the browser instance but not sure how accurate it would be

    Depends on your use case I guess, but why not set a cookie for each visitor and check that way

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c3b676b0-1937-4dda-a22f-198694d7d940%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Matt Jones at Feb 15, 2016 at 9:10 pm

    On Saturday, 13 February 2016 05:15:29 UTC-5, Ruby-Forum.com User wrote:
    I am using a Rails 4 application, when in production mode i am getting
    same IP address for all the members of the same organisation. The
    requirement is to get different IP address for each member so as to
    uniquely identify each system.

    request.remote_ip
    request.env['HTTP_X_REAL_IP']
    request.env["HTTP_X_FORWARDED_FOR"]

    All these fetches me the same IP for each system. How can i uniquely
    identify each system? Please help.
    `remote_ip` is calculated from the other two (and a few additional
    headers). The calculation may sometimes misunderstand the network topology,
    so if you're getting an IP that's part of your infrastructure (load
    balancers / proxies / etc) for every client it may be worth looking into.

    Otherwise, your options are very limited. One of the *purposes* of
    organization-level NAT is to avoid leaking internal addresses / machine
    identities to the outside (for security). I've read of a way to use the
    Javascript WebRTC API to get the client's LAN address, but I wouldn't
    recommend depending on that for anything like licensing or authorization
    since any data coming from JS is trivially spoofable.

    I'd recommend that you push back on whoever / whatever is imposing this
    requirement to figure out what the intent is. You may need to find an
    alternative way to achieve that goal.

    --Matt Jones

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/121d56da-5642-4cca-bdad-88e30b1012d1%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Toby Joy at Feb 23, 2016 at 7:00 am
    Thanks, and will try using cookies first.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/295840ca7d7c4107df9afb8ba0060978%40ruby-forum.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedFeb 13, '16 at 10:14a
activeFeb 23, '16 at 7:00a
posts5
users4
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase