Friday, April 20, 2007

Easiest possible way to port forward


Say you have a mysql server that you do not want to make public. Port 3306 is blocked by your firewall but port 22 is open for ssh.

Just connect tp your mysql server from putty on port 22 and modify one setting.
Connection->SSH->Tunnels add "L3306 127.0.0.1:3306"

After you make this change you can Click on Session and save your changes.

Once you connect through putty, you will be able to access the remote mysql server by localhost:3306.

Warning: Don't forget that this port is local now! If you forget that port 3306 is forwarded, you may wonder why you have a mysql server running on your machine.
If you decide later to install mysql on your local machine you should delete the port forward from the putty config to avoid unintentional changes your remote server.

1 comment:

Tomm said...

Neat !
Thank you :-)