6

I'm trying to map 'localhost' to an IP address elsewhere on the network, say '10.0.1.1' for example. I've tried editing my hosts file, changing the entry from:

127.0.0.1   localhost

to

10.0.1.1    localhost

with no luck. The closest I've gotten is using DNS spoofing via Charles. Adding a DNS spoof entry mapping the host name 'localhost' to '10.0.1.1' works fine in Firefox, but fails in Internet Explorer, basically showing IE's 404 page. I'm wondering if there's some specific setting or way I can get DNS spoofing to work in IE?

The main issue I'm trying to resolve is that our development environment points to 'localhost' and rather than setting the dev env up in a legacy Windows laptop to try and debug, point to a server that has it all setup and I can make the changes remotely.

1
  • 2
    I wouldn't point localhost away from 127.0.0.1 because I have no idea what you'll break, but I bet it will be a nontrival amount of stuff. YMMV of course.
    – Fred
    Apr 24, 2010 at 22:16

4 Answers 4

2

As far as I know it's not possible to remap localhost, since it's part of the TCP/IP stack, also a lot of things depends on this setting and I would break almost everything network related. If you can provide a little more of insight about what you are trying to achieve I may be able to help you. For example you could set up a small apache server (XAMPP for example) and set an htaccess redirect to the other ip.

1
  • This seems to defeat the purpose of a config file :( It works fine on Win7, but not XP for me. Aug 3, 2013 at 4:01
2

There is a way to forward specific port of any IP address to another with PassPort: http://sourceforge.net/projects/pjs-passport/ I think it would be enough for you to add 80 port.

1
  • Only solution to work on Win XP. Sep 16, 2013 at 11:58
2

You can use this nifty utility http://www.quantumg.net/portforward.php

Use 80 for port, and add IP and port of the machine you want it to forward to. Open your browser (tested in FF and IE8) and it should just work.

0

go to IIS service in the properties > Site Web >advance> in th multiple Identity you should have " Default 80 " not only Your card IP

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .