rails/devise: heroku app not recording user's ip addresses correctly? - heroku

All of the users in my app's Users table have signin IP addresses that are 'private' 10.x.x.x
So while devise is recording the IP address of a user when they signin, it appears to ACTUALLY be recording some sort of heroku internal IP address, probably related to the fancy grid architecture routing.
Does anyone know how my heroku-hosted app can record the actual incoming IP address?

It should be able to.
Something like this should yield the proper IP address:
ip = env[‘HTTP_X_REAL_IP’] ||= env[‘REMOTE_ADDR’]

The problem is because your app is behind a proxy or something like that.
Look at this patch: https://github.com/plataformatec/devise/pull/1398
It should solve the problem.

Related

How can I get the IP address of users opening my heroku app?

Is there a way to view the IP addresses of people who have visited my web application which was deployed with heroku? swish-prophet.herokuapp.com
From within your app's code, you can get the IP address of the person making the request using the HTTP_X_FORWARDED_FOR HTTP header.
You can also see that information in your app logs with the heroku logs command.
You can use $_SERVER['REMOTE_ADDR'] with php.
But you need to consider that some users are behind a proxy system, so there's no way to register that users correct address.
Some websites use REMOTE_ADDR such as:
IP Chicken
Mi IP
Meu IP
My IP Address

FTP Behind Firewall and Dynamic IP Address

I'm currently working on a client project and I get access to files via FTP. Their server is behind a firewall and they're asking me for my IP address, I'm guessing for whitelisting.
Problem is, my IP address is dynamic and it changes quite a lot throughout the day. Is there anyway around this?
Thanks in advance.
The best way to avoid paying for a static IP is to carry on using a dynamic IP address, but use a dynamic DNS provider such as No-IP which you can cause to update every time your IP address changes (routers will often do this for you automatically, or there are Windows / OSX / Linux (such as ddclient) clients). That way, you can just use something like magpie.no-ip.com instead of an IP address and it will always resolve to your public address.
You can find the whole answer here: https://superuser.com/questions/455226/can-you-configure-dynamic-to-be-static-yourself-without-changing-your-isp

Siteminder bypass authentication for specific IP address

I have a resource/url that is protected by siteminder. I would like to allow access to url for anyone coming from a specific IP address range.
If a browser is from a specific IP address range, I don't want them to Authenticate, they need to see the url without being prompted to log in.
Is there a way in siteminder to allow open access for specific IP address ranges, but require login for anyone outside of that range?
thanks
This is probably a bad idea security wise since an IP address could be spoofed leaving your application completely open. If you still wanted to continue I would look into using a load balancer/proxy to forward the request to another agent with a separate configuration.

Get the ipaddress of windows phone mango device

In the deviceextendedproperties class there is no way to get the ip address of thedevice.
refer : deviceextendedproperties.
Please will you tell me how to get this.
To get the IP address, do a remote lookup on a site like http://www.whatsmyip.org/
There's no API for this, and neither should there be.
There is no API currently in the WP7 for knowing Ip address.
But other network properties can be obtained are describe in this link.
http://msdn.microsoft.com/en-us/library/microsoft.phone.net.networkinformation%28v=VS.92%29.aspx

Mac-os-x how to get network details like ip-address, subnet mask,etc

I am new to Mac-OS-X development. I want to get the users Network details just for displaying it in my application. Details such as the IP address, Subnet mask, status whether connected or not, etc.
Is it possible to get the same??
And secondly, Is the IP address different for wireless lan connections and the normal ethernet connections?? I am a little weak at networking concepts.
Any help will be appreciated.
note: I already tried searching the apple developer site for leads but wat i could find is only the System Configuration Programming guide
Strange.. There are no Frameworks or classes to get the IP address... But i somehow managed to get my hands on the following information.. First with this reference.. And secondly i found that..
As mentioned in the link, If we manually set the IP, then it gets stored in the preferences.plist.
But if we set the IP to DCHP, then we can get the ConfigMethod as "DCHP" and hence check the com.apple.network.identification.plist, it'll have the details for the IP address.
Hence with the use of both the plist and checking whether the ConfigMethod is "Manual" or "DCHP" we can get the current IP address albeit this is not documented anywhere.

Resources