Are you trying to setup a VPN between your home and work system?
If so, then consider Hamachi (free for personal use) from LogMeIn.com. This will establish a VPN between several systems so that they appear to all be on the same LAN.
If you want some kind of VPN to a proxy server which then accesses the outside world, I'm not sure that is going to work so well.
You could setup an ssh tunnel for specific ports to transship some protocols
ssh -L from_port:ultimate.destination.system.address:destination_port transshipping.system.address
NOTE: The connection from your starting system to the transshipping system is encrypted as an ssh tunnel. The connection from the transshipping system to the ultimate destination system is a generic regular TCP/IP connection (no encryption).
Thank you, Bob.
In reality I'd like to bypass the proxy and the firewall and the only possible way is through port 22, ssh. Ports 80 and 443 are proxied. On which port does hamachi work? Is it proxy compatible?
I already knew ssh -L command, the problem is that you have to manually specify every single port you need to forward. I found this http://macdevcenter.com/pub/a/mac/2002/12/20/vpn.html?page=2 but I can't understand if is possible to restrict the service only to some applications.
You may be able to do at least some of what you want by creating a SOCKS proxy and tunneling it through SSH to your home server. You would then direct applications to use that proxy in the Network preference pane. Some will use it, some probably won't.
The easiest way to create the tunnel would be to use an application such as "Meerkat."
Otherwise you can do it in the shell; see the ssh(1) man page for details.
Hamachi can work through a Proxy server. Hamachi -> Preferences -> Settings -> Advanced -> Server Conne ction -> Use Proxy
Or you can use port forwarding if you prefer. The following URL tells you the ports Hamachi would use if you decide NOT to use a Proxy server.