I'm working on a complex SSH tunneling setup through a jump server so that users on Windows machines can retrieve an application license from a license server located behind this jump server. To make this setup function correctly, I need to add an entry in my Windows hosts file as follows:
127.0.0.1 license_server
Then, to facilitate the tunneling, I run:
ssh -L 1055:jump_server:1055 -L 1056:jump_server:1056 me@jump_server
I've already set up iptables rules on the jump server to forward traffic on ports 1055 and 1056 to the license server, and I've tested it successfully. My Windows 10 machine can check out licenses correctly. However, I'm concerned about whether this might disrupt other applications that require access to localhost. Could there be issues unless those applications are explicitly calling 'license_server'?
3 Answers
If you're concerned about breaking anything, you could use another loopback address like 127.0.0.2 instead:
127.0.0.2 license_server
Then, when you tunnel, use 127.0.0.2 for the ports too. This way, you won’t interfere with any existing applications that rely on the default localhost address.
You can definitely have multiple hostnames linked to the same IP in the hosts file, so adding that line for 'license_server' shouldn't cause any problems. Just make sure to keep the regular 'localhost' entry as well. By the way, why not consider setting up a VPN to reach the license server? That way, you wouldn't need to modify your hosts file at all, and it can create a more straightforward connection.
Mapping the loopback address can cause issues with applications that need to bind to it, particularly things like HTTP.SYS. If you're doing development work in environments like Visual Studio, you might run into serious hurdles due to changes from recent Windows updates. It's worth looking into how these modifications might affect your projects.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures