I'm developing an application A that connects to remote server S on some port (>1024). For security reasons the server S only allows connections from a specific machine I with a white-listen IP-address. That's fine when running the application, but makes developing it a pain in the... lower back side. Is there a simpler way, without setting up a full-fledged VPN solution that will allow me to run a program locally on my machine, L, which will simply establish and forward the entire connection via I to S?
In brief, what I want to accomplish is that when I run the program locally, it connects to S via I, allowing it to communicate via the whitelisted IP-addresss.
Although it sounds like a MITM, it's not. A (and the host machine L) do not need to be agnostic and I have full access to every machine except the target machine S, so changing things like hosts files, network interfaces, and setting up ssh-tunnels are all fine.
All the servers are Linux (Ubuntu LTS), my local machine is a Mac running OSX.
ssh -L local_port:S_ip:app_port user@I_ip
, then point your app at 127.0.0.1:local_port. Does that not work?