- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Microsoft
- >
- Get the correct IP address
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2009 05:26 AM
тАО07-10-2009 05:26 AM
I'm using this code:
<%=Request.ServerVariables("REMOTE_ADDR")%>
in the .asp webpage installed on the WIN2000 webserver to show via browser the internal IP address from the workstations.
Normally works, but the problem is, sometimes it shows proxy IP address instead of the workstation.
Howto solve this problem?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2009 01:51 PM
тАО07-10-2009 01:51 PM
Solutionsince no "real address" is ever sent except in INTRANETs.
An IP address is something used at the network layer, and shouldn't really be used by your application. If your application needs to know the identity of the sending machine, then it should use something like X.509 certificates, which are meant to represent identity (an IP address is not).
further more you can try when you are using proxy:
<%
ipaddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if ipaddress = "" then
ipaddress = Request.ServerVariables("REMOTE_ADDR")
end if
%>
Hope that it solve your issue and doubt.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2009 03:25 AM
тАО07-14-2009 03:25 AM
Re: Get the correct IP address
<%
ipaddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if ipaddress = "" then
ipaddress = Request.ServerVariables("REMOTE_ADDR")
end if
%>
but the output is empty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2009 07:46 AM
тАО07-14-2009 07:46 AM
Re: Get the correct IP address
put the ip address of the proxy between ""
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2009 07:55 AM
тАО07-14-2009 07:55 AM
Re: Get the correct IP address
Can you pls post the whole code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2009 09:15 AM
тАО07-14-2009 09:15 AM
Re: Get the correct IP address
ipaddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if ipaddress = "" then <<< add your proxy ip"" here and try
ipaddress = Request.ServerVariables("REMOTE_ADDR")
end if
%>
example :
<%
ipaddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if ipaddress = "192.168.11.253"
ipaddress = Request.ServerVariables("REMOTE_ADDR")
end if
%>
plz reply the results of the outcomes