I am using a SSH tunnel to a remote machine using plink.exe in Putty on Windows 8. I am also running a web application using the same port.
So to avoid any port conflicts I have bound the tunnel to 127.0.0.10. I have also added a host name entry for 127.0.0.10 in my hosts file on my local machine in order to use a more sane name.
The tunnel works fine using the host name I have added to the hosts file. It also works fine using just the 127.0.0.10 ip address.
But if I start my ssh tunnel prior to starting my local web application, which again both share the same port number, then localhost points to my ssh tunnel on 127.0.0.10 and not to my local web application on 127.0.0.1.
I find this odd as I would expect localhost to be bound to 127.0.0.1.
Can anyone shed some light on why this is ?