Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!
all groups > iis security > august 2008 >

iis security : Getting Ip address of the actual client


Hariprasad
7/13/2006 3:08:25 AM
How can I get IP address of the requested client?

When I am using request.servervariables('remote_addr'), I am getting public
IP, but not the actual client IP.
My application is hosted on public IP 202.63.107.242, and through IP
forwarding it was being redirected to 192.168.100.147. How to get the
requested client's private IP address, if the requestor is within the
David Wang [Msft]
7/13/2006 3:40:48 AM
The network device doing the redirection needs to preserve/forward this
information. If it does not, then obviously there is no way for the server
application to get that information. This is how the anonymous Internet
works.

So, the real question is whether the network device doing the forwarding
preserves this information.

For example, this sample ISAPI Filter code will log the private IP address
*assuming* the network redirecting device forwards that original IP on the
redirected Request.
http://blogs.msdn.com/david.wang/archive/2005/09/28/HOWTO_ISAPI_Filter_which_Logs_original_Client_IP_for_Load_Balanced_IIS_Servers.aspx

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//

[quoted text, click to view]

Karl Levinson, mvp
7/13/2006 4:32:01 AM

[quoted text, click to view]

I'd avoid posting your real IPs to Usenet newsgroups, just in case.

I'm not sure why you feel you need the internal IPs, that seems like an
unusual need. But if you can't get the internal IPs from the HTTP headers
because they've been stripped, I believe you could probably use client-side
tools like a cookie and/or Javascript to ask the clients to send you that
information with each page request, or with the initial user login form if
there is one. Some web sites use this method to defeat anonymous proxies.
Of course, clients can disable and inhibit those responses, but you could
prevent those clients from connecting if you wanted to.

Unless those internal IPs are static IPs, which they usually aren't,
tracking the internal IP seems of limited use, if you're trying to track who
is connecting, all the way down to the individual user. If you have a
temporary DHCP IP address with a lease of 30 days, your machine starts trying
to get a new one at 15 days, and that means that in half that time, in 7
days, your logs have a 50% chance of no longer having the correct IP address.
The new IP will probably be in the same subnet, so you'll still know the
general location.

--

kind regards,
Karl Levinson, CISSP, CCSA, MCSE [MS MVP]
-------------------------
Microsoft Security FAQ:
http://www.securityadmin.info
Daniel Crichton
7/13/2006 11:47:44 AM
Hariprasad wrote on Thu, 13 Jul 2006 03:08:25 -0700:

[quoted text, click to view]

Look for the following:

HTTP_X_FORWARDED_FOR

HTTP_CLIENT

These will be either a single IP, or a list of IPs separated by commas, if
they are available (many proxies don't include these headers).

Dan

hariharadeep
8/4/2008 4:44:01 AM
Using remoting methodology you can get those details of server machine located.
Also i do recommend not to mention your private IP's on the blogs. It would effect your employment in your company.

"Maintain in different application pools so that burden with the servers too will be reduced."

From http://www.developmentnow.com/g/91_2006_7_0_0_787561/Getting-Ip-address-of-the-actual-client.htm

Posted via DevelopmentNow.com Groups
AddThis Social Bookmark Button