# Tunneling my LAN though a secure connection to a (remote) dedicated server.



## dextro_ (Apr 8, 2010)

I have been reading the OpenVPN docs for 2 hours and still don't have any idea if it is even the software I need. I have a FreeBSD gateway setup for my LAN with PF for NAT. I also have a FreeBSD server I rent in a data center and I would like to transparently tunnel all my LAN's Internet needs though the data center server. 

So my question is: is OpenVPN what I am looking for or is their something more fitting?


----------



## SirDice (Apr 8, 2010)

Yes, OpenVPN is what you are looking for.


----------



## varda (Apr 20, 2010)

*ssh tunnel*

Also you can try OpenSSH tunnelng feature. It already bundled with OS. Then just set default route to remote side of ssh tunnel. On remote server you can also set a back route and run NAT.

```
%man ssh
...
     -w local_tun[:remote_tun]
             Requests tunnel device forwarding with the specified tun(4)
             devices between the client (local_tun) and the server
             (remote_tun).

             The devices may be specified by numerical ID or the keyword
             ``any'', which uses the next available tunnel device.  If
             remote_tun is not specified, it defaults to ``any''.  See also
             the Tunnel and TunnelDevice directives in ssh_config(5).  If the
             Tunnel directive is unset, it is set to the default tunnel mode,
             which is ``point-to-point''.
...
```
OpenVPN may be convinient if you have reliable link and want to bridge several remote LAN segments across WAN/Internet.


----------

