How to OpenVPN on OpenBSD as Layer2 VPN
Getting OpenVPN running on a recent OpenBSD pretty simple. I run OpenVPN 2.1 on OpenBSD-current as of 2010/03/10 (almost 4.7) with PSK as a layer2 VPN. Layer2 because I have some zeroconf/bonjour stuff running at my LAN and I want to connect to my iTunes shares through the VPN. I’ll make it very short: Install OpenVPN from packages (or ports if you want to), configure a bridge, create a PSK and create a simple config file.
|
|
Paste this to /etc/openvpn/server.conf:
|
|
To make OpenVPN start on boot create /etc/hostname.bridge0 with:
|
|
And /etc/hostname.tun0 with: (I had to set link0 to get it working)
|
|
That’s it. You can reboot to test if it’s working or just run OpenVPN with
|
|
A simple client configuration would look like:
|
|