Private Tunnel/VPN through SSH Portforwarding or open port

Hi!

At first, I want to say, I've already tried to solve it by myself with OpenVPN, but didn't get it. My FreeBSD 9 box should be my private tunnel for all connections.

If I'm on a public wlan or in the corporate network, I want to tunnel all traffic through my FreeBSD box, so that I'm able to connect to everything. I'm able to connect through ftp, ssh, http and https from my company to the outside world. No SMTP(s) to mailserver or something else is available.


So I need following:
  • Client for my MacBook (openVPN client or built in standard vpn connection)
  • tunnel connection port through ssh (eg -L1723:localhost:1723)
  • FreeBSD box: which tools should I use? openvpn, ppptp, ipsec ... doesn't matter, should just be straight forward and easy :-D


regards,
sebastian
 
The simplest solution is to use ssh(1). Just make sure your FreeBSD server is online and has port 22 open. Then, on your MacBook/Linux/FreeBSD workstation:
[cmd=]ssh -D8080 myfreebsd.host.at.home[/cmd]

On Windows you can use PuTTY, it can also create a dynamic port forward.

Configure your browser to use http://localhost:8080 as a SOCKS-5 proxy.
 
hi!

I have already found this socks proxy solution but I've not the option to use a proxy with every tool, so I need to build a VPN.

I thought about something like this:
  1. fbsd FreeBSD box offers PPTP
  2. With ssh(1) I'll forward 1723 for PPTP
  3. Connect with built in VPN client to localhost

Don't know if this is possible, just brainstorming :)
 
That's way too complicated. I would set up an OpenVPN server on the FreeBSD machine that listens on the TCP port normally used by HTTPS, 443. That way the corporate firewall will let you trough. PPTP is probably out of the question because it needs an auxillary GRE protocol connection on top of the TCP connection to port 1723.
 
It's probably /usr/local/share/doc/openvpn/sample-scripts/openvpn.init.
 
Back
Top