Security
Security How To
How To Set Up a Site-to-Site VPN with OpenVPN | How To Set Up a Site-to-Site VPN with OpenVPN |
|
|
| Brandon Teska | |
| March 19, 2008 | |
Installing OpenVPNFirst, we need OpenVPN. Grab the latest stable release from here and compile it on both the server side OpenVPN machine and the client side OpenVPN machine. Download, unpack, configure, compile and install OpenVPN with the following: ~ $ wget http://openvpn.net/release/openvpn-2.0.9.tar.gz ~ $ tar xvzf openvpn-2.0.9.tar.gz ~ $ cd openvpn-2.0.9 ~/openvpn-2.0.9 $ ./configure ~/openvpn-2.0.9 $ make ~/openvpn-2.0.9 $ su -c 'make install' - OpenVPN requires OpenSSL which is included in most Linux distros. If you don't have it, you'll need to install it first. - OpenVPN also requires the TUN kernel module. This is usually compiled as a module on most vanilla kernels but didn't want to autoload for me. You can manually load it using modprobe tun. - I used the latest stable release: 2.0.9 Public Key Infrastructure ReviewLike WPA-Enterprise, OpenVPN relies on a Public Key Infrastructure (PKI). Remember all the trouble we had to go through to get a PKI set up for FreeRADIUS? Turns out that the folks behind OpenVPN found setting up a PKI a bit cumbersome too and wrote a few wrapper scripts to make it incredibly simple to get your own PKI up and running. OpenVPN's easy-rsa scripts make this a snap. This process is explained well in OpenVPN's documentation so I'll just give a brief overview here. Change in to the easy-rsa directory under the unpacked OpenVPN directory (~/openvpn-2.0.9/easy-rsa) and edit the vars file to suit your needs. I usually increase the key size to 2048 bit (line 40): export KEY_SIZE=2048 Then change the key fields on lines 45-49 to suit your application: export KEY_COUNTRY=US export KEY_PROVINCE=NY export KEY_CITY="New York" export KEY_ORG="SmallNetBuilder" export KEY_EMAIL="brandon@smallnetbuilder.com" Next, initialize the vars file with: ~/openvpn-2.0.9/easy-rsa $ . ./vars Finally, initialize the work environment and build the Certificate Authority (CA): ~/openvpn-2.0.9/easy-rsa $ ./clean-all ~/openvpn-2.0.9/easy-rsa $ ./build-ca OpenSSL will ask for values for the fields we defined in the vars file; just hit enter to accept the defaults. When you get to the Common Name field, enter whatever you want for the CA (I use the very creative name, "CA"). Common Name (eg, your name or your server's hostname) []:CA Next, build the server's key (in the command below, server will be the key's filename): ~/openvpn-2.0.9/easy-rsa $ ./build-key-server server Enter a meaningful Common Name, sign the key and commit it to the database. Similarly, build the client key: ~/openvpn-2.0.9/easy-rsa $ ./build-key remote_office Related Articles:The Smart Traveler's Guide to Data Theft ProtectionHow To: Setting up FreeRADIUS for WPA & WPA2 Enterprise - Part 2 A Powerful Open Source UTM: Untangle Gateway Reviewed How To: WinXP's IPsec client really can work! How To: One Internet connection - Two Private LANs |
|
New firmware 2.1.0
Your thoughts about QNAP TS-109 II
OpenWRT not working as wireless repeater bridge on Netgear WGR614L
OpenWRT working as wireless client bridge on Netgear WGR614L
DIY or buy used?
|
|
|
|
|
|
|
|
More |
|
You could win a Trendnet TEW-633GR Wireless N Gigabit Router and two TEW-621PC 300Mbps Wireless N-Draft PC Cards |
| Wireless Performance Charts: Belkin N+ Wireless Router |
| Router Performance Charts: Belkin N+ Wireless Router |
|
Windows market share drops to 15-year low Black Friday shopping results not entirely negative Power.com aims to become a one-stop social networking portal |
Nokia Plans to Launch Z-Wave Home Control Center in 2009