Request.UserHostAddress - fake IP RRS feed

  • Question

  • I have a web application where I check the IP of the user by using Request.UserHostAddress. I use the IP to select the right country in a dropdownlist. Now I have a problem with a user sitting in Denmark where he always get his IP mapped to Sweden.

    To test this I need a way to fake his IP. I tried with Firefox addon ModifyHeaders and added all kind of "IP headers" I could find. No one forced Request.UserHostAddress to pick up my faked IP.

    From where is Request.UserHostAddress reading the IP?

    Wednesday, June 23, 2010 7:25 PM


  • Hi,

    When you access a web server the web server get's specific information from the remote host. In this case the user from Denmark who's getting a IP Address from Sweden. By putting a request to the web server, the web server responds and asks information regarding browser, ip addresses, DNS, etc.

    On the specific socket it will request the client for IP Address, etc etc. You can find more on a intresting blogpost: http://geekexplains.blogspot.com/2008/06/whats-web-server-how-does-web-server.html


    • Marked as answer by eryang Monday, July 5, 2010 2:33 AM
    Wednesday, June 23, 2010 9:44 PM

All replies