A couple of days ago, while being at home, I had to access a couple of services for testing, that are under normal circumstances only accessible from the companies intranet.
While there is a VPN which I can access, my current internet provider lacks the desired bandwidth for normal work to be done via the VPN. For commodity reasons, or for others unknown to me, the company has a backdoor server, which grants me easy access on companies intranet.
Never having done before port forwarding, I looked it up a bit, and found the PuTTY articles of doing it rather confusion, from one point of view: not being verbose enough for the ones who never had to deal with port forwarding before.
I was already aware of the principle behind port forwarding, and if you aren’t I don’t think I can make it much clearer than the with following image.
For the port forwarding you need to have access to a ssh server that has port forwarding enabled (which is by default), and another server you cannot access; unless you are using port forwarding for other, more obscure reasons. Right?… right?
In the first step you add the IP/Hostname of the SSH server, while in the second step you set the local port and the destination of the port forwarding (with port number). After you click Add on the second step you can hit the Open button. The SSH server will pop up the terminal window and ask for the required credentials. After logging in you must leave the terminal window open.
From that point onward any connection done to the port 2000 (in my example) will forward to the destination you specified.
While this is a procedure which someone with half a brain could do, I was really stumped on it.
ssh -L 2000:destination.server:6667 ssh.server:22
Yes, if you have SSH client installed it is much easier. But we both know that under Windows the defacto SSH client is PuTTY.
- Image taken from here, copyright on the image is their as well.
- Yes, two steps, aside from the article I’ve read which had four steps, of which two have dealt with a little customization
- And that would make me practically brainless :)