How to setup a VPN server in a FreeNAS jail

This post is not about configuring FreeNAS to connect to a VPN, but about running a VPN server inside FreeNAS, so you will be able to access all your jails and every host on your local (home) network from the outside, using the secure VPN tunnel.

Using a VPN connection is like sending a mail envelope inside another one: the external envelope is addressed to your VPN endpoint (the server), and only the server can extract the internal envelope and process it (i.e., forward it to the specified address) as if it originated locally (thus you can access private addresses on your local network). Replies will be sent back on the tunnel by securely re-encapsulating them in an external envelope.

So, after you are connected to your VPN, you can for example

ssh root@192.168.0.1

(or whatever addresses you are using) through the Internet.

Continue reading “How to setup a VPN server in a FreeNAS jail”