I want to test my web app with different IP addresses. I'm looking for a way to change my IP address when browsing my site located in (WAMPServer).
What can I do to fake my IP address in localhost?
22 Answers
If the IP address you want to test with is not located in your subnet or is not in use you can add an additional IP to your network adapter.
In the Control Panel -> Network settings -> LAN connection properties, select IPv4 -> Advanced and Add a new IP address with a subnet mask of 255.255.255.255. You might need to restart your WAMP server (Apache module) for the changes to take effect.
You didn't specify what software you were using for a proxy.
But basically:
For a proxy to work, it has to have access to 2 networks.
For something to have access to a system's 127.0.0.1 (which lives in the 127.0.0.1/8 network), it has to be running on that same system.
So you need to run your proxy on that system and tell it to proxy incoming requests from wherever to 127.0.0.1 back and forth.
Keep in mind that:
NAT+port forwarding won't work unless you're running the localhost service on the router itself.
- NAT+port forwarding can only get you as far as a NIC on the system but not one hop further into its localhost.
Again, since you have to run the proxy on the same system as the localhost, the only other IPs you can choose are the ones that are being used on that system for Internet or LAN connectivity.
Some advanced techniques could be used to forward incoming traffic received by the system on a specific port to the localhost service to 127.0.0.1. This includes:
iptablesconfiguration if this is a Linux systempossibly something with the right
routestatements (Windows and Linux)software that directly "re-proxies" traffic like
rinetd(available on most Linux distros and probably on Windows through Cygwin)and even going so far as setting up a VPN between your router and this system.