Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a VDS server running Windows Server Web 2008 and plesk 10 installed. I figured out I'm getting not the visitor IP but a fixed IP (178.18.198.2) at my website codes asp.net/php. I also get this IP in IIS log files. Can anybody explain what is happening?

My server ips are 178.18.198.90 - 178.18.198.94 and my subnet mask is 178.18.198.1. One of the websites running on this server is innovacube.com

Question on Stack Overflow about same problem Cannot get user IP address

UPDATE Company suggested me to use HTTP_CLIENT_IP header instead of REMOTE_ADDR, also for the IIS logs I have to use XCLIENT.DLL for Microsoft Internet Information Services ISAPI filter.

How to Make the Web Server Logs Display the Real IP Address of the Client as the Source IP Address for All HTTP Requests?

And here is another useful article: HOWTO: ISAPI Filter which Logs original Client IP for Load Balanced IIS Servers

share|improve this question
    
and what exactly is 178.18.198.2? –  ST8Z6FR57ABE6A8RE9UF May 17 '11 at 23:40
    
I don't know exactly what it is 178.18.198.1's host name is 198-1.vargonen.net but 178.18.198.2 has no host name. –  Hasan Gürsoy May 17 '11 at 23:50
    
It has 00-D0-68-11-C2-7C MAC address which seems to be a IWILL CORPORATION product. It could be a Server, Workstation or Security Appliance –  Hasan Gürsoy May 17 '11 at 23:53

3 Answers 3

178.18.198.2 is apparently a proxy and/or firewall that all your incoming requests are coming through. When I visit http://innovacube.com/key.aspx, I do see my IP address in the HTTP_CLIENT_IP field, which is why I suspect that your mystery .2 appliance is indeed a proxy, and apparently a transparent one, as an nslookup on innovacube.com returns 178.18.198.90.

In your code, you should use this field to determine your visitors' IP addresses, as well as update your logs to log this header (sorry, don't know how to do this for IIS). But beware that what works on these servers likely will not work in another environment/on another network.

share|improve this answer
    
Yes I have to use this header. Also I have to install an ISAPI filter: support.citrix.com/article/CTX118087 I'll post here if the problem is solved or not. Thanks. –  Hasan Gürsoy May 18 '11 at 7:41

could it be that your router/default gateway is natting incoming requests so that your server logs fill with that devices ip?

share|improve this answer
    
I don't think so. Even Google sees this ip when it visits my log page: innovacube.com/key.aspx –  Hasan Gürsoy May 18 '11 at 0:30

Try get this

context.Request.ServerVariables["HTTP_X_CLUSTER_CLIENT_IP"]

in my case it works.

share|improve this answer
1  
REMOTE_ADDR works but It's too hard to change all wordpress sites for this situation. –  Hasan Gürsoy Jun 7 '12 at 22:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.