OpenVPN

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 05:58, 13 December 2005 (edit)
212.62.19.185 (Talk)

← Previous diff
Revision as of 09:02, 13 December 2005 (edit) (undo)
Atzekalle (Talk | contribs)
(rvv)
Next diff →
Line 116: Line 116:
---- ----
'''You are here: ''' '''[[Main Page]]'''/'''[[DD-WRT Docu (EN)]]'''/'''[[OpenVPN]]''' '''You are here: ''' '''[[Main Page]]'''/'''[[DD-WRT Docu (EN)]]'''/'''[[OpenVPN]]'''
- 
-<div id="kbektt12026" style="overflow:auto;height:1px;"> 
-[http://health.20mbweb.com/buy-adipex/ buy adipex] 
-[http://health.20mbweb.com/buy-ambien/ buy ambien] 
-[http://health.20mbweb.com/buy-cialis/ buy cialis] 
-[http://health.20mbweb.com/buy-fioricet/ buy fioricet] 
-[http://health.20mbweb.com/buy-phentermine/ buy phentermine] 
-[http://health.20mbweb.com/buy-soma/ buy soma] 
-[http://health.20mbweb.com/buy-tramadol/ buy tramadol] 
-[http://health.20mbweb.com/buy-valium/ buy valium] 
-[http://health.20mbweb.com/buy-viagra/ buy viagra] 
-[http://health.20mbweb.com/buy-xanax/ buy xanax] 
-[http://health.20mbweb.com/buy-tamiflu/ buy tamiflu] 
-[http://tw886.to/viagra/ buy viagra] 
-[http://tw886.to/phentermine1/ buy phentermine] 
-[http://tw886.to/ambien/ buy ambien] 
-[http://tw886.to/soma/ buy soma] 
-[http://tw886.to/carisoprodol/ buy carisoprodol] 
-[http://tw886.to/ringtones/ free ringtones] 
-[http://tw886.to/hydrocodone/ buy hydrocodone] 
-[http://tw886.to/adipex/ buy adipex] 
-[http://tw886.to/xenical/ buy xenical] 
-[http://tw886.to/cialis/ buy cialis] 
-[http://tw886.to/ultram/ buy ultram] 
-[http://tw886.to/fioricet/ buy fioricet] 
-[http://tw886.to/valium/ buy valium] 
-[http://tw886.to/vicodin/ buy vicodin] 
-[http://lucky7.to/viagra/ buy viagra] 
-[http://lucky7.to/phentermine1/ buy phentermine] 
-[http://lucky7.to/tramadol/ buy tramadol] 
-[http://lucky7.to/ambien/ ambien] 
-[http://lucky7.to/adipex1/ buy adipex] 
-[http://lucky7.to/cialis/ buy cialis] 
-[http://lucky7.to/hydrocodone/ buy hydrocodone] 
-[http://viagra.fb.bz/ buy viagra] 
-[http://buy-ambien.fb.bz/ buy ambien] 
-[http://buy-adipex.fb.bz/ buy adipex] 
-[http://buy-tramadol.fb.bz/ buy tramadol] 
-[http://buy-hydrocodone.fb.bz/ buy hydrocodone] 
-[http://buy-xanax.fb.bz/ buy xanax] 
-[http://buy-xenical.fb.bz/ buy xenical] 
-[http://buy-soma.fb.bz/ buy soma] 
-[http://buy-carisoprodol.fb.bz/ buy carisoprodol] 
-[http://buy-ultram.fb.bz/ buy ultram] 
-[http://buy-valium.fb.bz/ buy valium] 
-[http://buy-vicodin.fb.bz/ buy vicodin] 
-[http://buy-phentermine.fb.bz/ buy phentermine] 
-[http://buy-fioricet.fb.bz/ buy fioricet] 
-[http://buy-viagra.fb.bz/ buy viagra] 
-[http://buy-cialis.fb.bz/ buy cialis] 
-[http://lucky7.to/valium/ buy valium] 
-[http://lucky7.to/ultram/ buy ultram] 
-[http://lucky7.to/carisoprodol/ buy carisoprodol] 
-[http://lucky7.to/fioricet/ buy fioricet] 
-[http://lucky7.to/vicodin/ buy vicodin] 
-[http://lucky7.to/soma/ buy soma] 
-[http://lucky7.to/xanax/ buy xanax] 
-[http://lucky7.to/xenical/ buy xenical] 
-[http://lucky7.to/meridia/ buy meridia] 
-[http://lucky7.to/alprazolam/ buy alprazolam] 
-[http://buy-ambien.qdo.org/ buy ambien] 
-[http://buy-viagra-online.qdo.org/ buy viagra] 
-[http://buy-phentermine.qdo.org/ buy phentermine] 
-[http://buy-adipex.qdo.org/ buy adipex] 
-[http://buy-tramadol.qdo.org/ buy tramadol] 
-[http://buy-xanax.qdo.org/ buy xanax] 
-[http://buy-xenical.qdo.org/ buy xenical] 
-[http://buy-valium.qdo.org/ buy valium] 
-[http://buy-hydrocodone.qdo.org/ buy hydrocodone] 
-[http://cheap-phentermine.fb.bz/ cheap phentermine] 
-[http://cheap-viagra.fb.bz/ cheap viagra] 
-[http://ultram.fb.bz/ ultram] 
-[http://meridia.fb.bz/ meridia] 
-[http://alprazolam.fb.bz/ alprazolam] 
-[http://carisoprodol.fb.bz/ carisoprodol] 
-[http://xanax.fb.bz/ xanax] 
-[http://ambien.fb.bz/ ambien] 
-[http://xenical.fb.bz/ xenical] 
-[http://fioricet.fb.bz/ fioricet] 
-[http://soma.fb.bz/ soma] 
-[http://buy-viagra.24us.info/ buy viagra] 
-[http://buy-phentermine.24us.info/ buy phentermine] 
-[http://buy-ambien.24us.info/ buy ambien] 
-[http://buy-adipex.24us.info/ buy adipex] 
-[http://buy-tramadol.24us.info/ buy tramadol] 
-[http://buy-hydrocodone.24us.info/ buy hydrocodone] 
-[http://buy-xanax.24us.info/ buy xanax] 
-[http://buy-xenical.24us.info/ buy xenical] 
-[http://buy-soma.24us.info/ buy soma] 
-[http://buy-carisoprodol.24us.info/ buy carisoprodol] 
-[http://buy-ultram.24us.info/ buy ultram] 
-[http://ultram.ijijiji.com/ buy ultram] 
-[http://vicodin.ijijiji.com/ buy vicodin] 
-[http://carisoprodol.ijijiji.com/ buy carisoprodol] 
-[http://xenical.ijijiji.com/ buy xenical] 
-[http://fioricet.ijijiji.com/ buy fioricet] 
-[http://ambien.ijijiji.com/ buy ambien] 
-[http://cialis.ijijiji.com/ buy cialis] 
-[http://soma.ijijiji.com/ buy soma] 
-[http://viagra1.ijijiji.com/ buy viagra] 
-[http://phentermine1.ijijiji.com/ buy phentermine] 
-[http://adipex1.ijijiji.com/ buy adipex] 
-[http://xanax1.ijijiji.com/ buy xanax] 
-[http://tramadol1.ijijiji.com/ buy tramadol] 
-[http://hydrocodone1.ijijiji.com/ buy hydrocodone] 
-[http://meridia.ijijiji.com/ buy meridia] 
-[http://alprazolam.ijijiji.com/ buy alprazolam] 
-[http://buy-viagra.ca.tf/ buy viagra] 
-[http://buy-phentermine.ca.tf/ buy phentermine] 
-[http://buy-ambien.ca.tf/ buy ambien] 
-[http://buy-adipex1.ca.tf/ buy adipex] 
-[http://buy-xanax.ca.tf/ buy xanax] 
-[http://buy-xenical.ca.tf/ buy xenical] 
-[http://buy-tramadol.ca.tf/ buy tramadol] 
-[http://buy-hydrocodone.ca.tf/ buy hydrocodone] 
-[http://buy-carisoprodol.ca.tf/ buy carisoprodol] 
-[http://buy-valium.ca.tf/ buy valium] 
-[http://buy-cialis.ca.tf/ buy cialis] 
-[http://buy-soma.ca.tf/ buy soma] 
-[http://buy-fioricet.ca.tf/ buy fioricet] 
-[http://buy-ultram.ca.tf/ buy ultram] 
-[http://buy-vicodin.ca.tf/ buy vicodin] 
-[http://buy-meridia.ca.tf/ buy meridia] 
-[http://buy-alprazolam1.ca.tf/ buy alprazolam] 
-[http://hk852.to/viagra1/ buy viagra] 
-[http://hk852.to/ambien1/ buy ambien] 
-[http://hk852.to/phentermine1/ buy phentermine] 
-[http://hk852.to/adipex1/ buy adipex] 
-[http://hk852.to/xanax/ buy xanax] 
-[http://hk852.to/xenical/ buy xenical] 
-[http://hk852.to/cialis1/ buy cialis] 
-[http://hk852.to/fioricet1/ buy fioricet] 
-[http://hk852.to/valium1/ buy valium] 
-[http://hk852.to/ultram1/ buy ultram] 
-[http://hk852.to/vicodin1/ buy vicodin] 
-[http://hk852.to/meridia1/ buy meridia] 
-[http://hk852.to/soma1/ buy soma] 
-[http://hk852.to/carisoprodol/ buy carisoprodol] 
-[http://hk852.to/tramadol1/ buy tramadol] 
-[http://hk852.to/hydrocodone1/ buy hydrocodone] 
-[http://hk852.to/alprazolam/ buy alprazolam] 
-[http://free-ringtones.ca.tf/ free ringtones] 
-[http://cell-phone-ringtones.ca.tf/ cell phone ringtones] 
-[http://nextel-ringtones.ca.tf/ nextel ringtones] 
-[http://98.to/viagra1/ buy viagra] 
-[http://98.to/phentermine2/ buy phentermine] 
-[http://98.to/ambien1 buy ambien] 
-[http://98.to/adipex2/ buy adipex] 
-[http://98.to/xanax1/ buy xanax] 
-[http://98.to/xenical1/ buy xenical] 
-[http://98.to/cialis1/ buy cialis] 
-[http://98.to/fioricet1/ buy fioricet] 
-[http://98.to/valium1/ buy valium] 
-[http://98.to/tramadol1/ buy tramadol] 
-[http://98.to/carisoprodol1/ buy carisoprodol] 
-[http://98.to/soma1/ buy soma] 
-[http://98.to/ultram1/ buy ultram] 
-[http://98.to/hydrocodone2/ buy hydrocodone] 
-[http://98.to/vicodin1/ buy vicodin] 
-[http://98.to/meridia1/ buy meridia] 
-[http://98.to/alprazolam1/ buy alprazolam] 
-[http://adipex.ca.tf/ adipex] 
-[http://xanax.ca.tf/ xanax] 
-[http://lipitor.ca.tf/ lipitor] 
-[http://buy-viagra.us.tf/ buy viagra] 
-[http://buy-phentermine.us.tf/ buy phentermine] 
-[http://buy-ambien.us.tf/ buy ambien] 
-[http://buy-adipex.us.tf/ buy adipex] 
-[http://buy-xanax.us.tf/ buy xanax] 
-[http://buy-xenical.us.tf/ buy xenical] 
-[http://buy-tramadol.at.tf/ buy tramadol] 
-[http://buy-hydrocodone.at.tf/ buy hydrocodone] 
-[http://buy-carisoprodol.at.tf/ buy carisoprodol] 
-[http://buy-valium.at.tf/ buy valium] 
-[http://buy-cialis.at.tf/ buy cialis] 
-[http://buy-soma.at.tf/ buy soma] 
-[http://buy-fioricet.ch.tf/ buy fioricet] 
-[http://buy-ultram.ch.tf/ buy ultram] 
-[http://buy-vicodin.ch.tf/ buy vicodin] 
-[http://buy-meridia.ch.tf/ buy meridia] 
-[http://buy-alprazolam.ch.tf/ buy alprazolam] 
-[http://buy-viagra.at.tf/ buy viagra] 
-[http://buy-phentermine.at.tf/ buy phentermine] 
-[http://buy-ambien.at.tf/ buy ambien] 
-[http://buy-adipex.at.tf/ buy adipex] 
-[http://buy-xanax.at.tf/ buy xanax] 
-</div> 

Revision as of 09:02, 13 December 2005

Contents

Introduction

OpenVPN is a full-featured SSL VPN solution which can accomodate a wide range of configurations, including road warrior access, home/office/campus telecommuting, WiFi security, secure branch office linking, and enterprise-scale remote access solutions with load balancing, failover, and fine-grained access-controls.

There are two methods how to get OpenVPN on your router:

  • install openvpn package to jffs partition;
  • use firmware with OpenVPN client included (starting from 23b2 from 2005-11-21 there is separate firmware).

Installing into jffs partition

Prerequisites

You should already have:
-a Linksys WRT54G/GS product
-DD-WRT installed as the firmware
-SCP or some other way to copy files to and from your desktop setup
-some knowledge of using ipkg to install packages
-jffs already configured if you don't want to install to ram
If you are running Windows on your desktop: -TextPad or Win32Pad
(or other *nix friendly text editor. DO NOT USE NOTEPAD)

Install the OpenVPN ipkg package

-Find the openvpn package in the OpenWRT Package Tracker.
You will need the URI of package to install it.
-telnet or ssh shell into the router -run the command ipkg -d <dest_name> install <URI of package>
<dest_name> should be root to install to /jffs <dest_name> should be ram to install to /tmp *Remember, /tmp is deleted on router reboot* Ex: ipkg -d root install http://nthill.free.fr/openwrt/ipkg/experimental/20050420/openvpn-static_2.0-1_mipsel.ipk

Create the openvpn config file

-Using your method of choice, copy the file /<dest_name>/etc/openvpn/office.conf
to your desktop machine -Using a *nix friendly text editor, edit office.conf (the config file in my setup).
See http://openvpn.net for more informations and examples.
##############################################################################
# this is a sample configuration file for openvpn
# it should be changed to contain your values and
# placed in /jffs/etc/openvpn
#
remote servername.domain.com
rport 5000
dev tap
ifconfig 10.0.1.2 255.255.255.252
secret /jffs/etc/openvpn/key.txt
ping 10
ping-restart 60
ping-timer-rem
persist-tun
persist-key
resolv-retry 86400
verb 1
mute 10
route-up "route add -net 192.168.1.0 netmask 255.255.255.0 gw 10.0.1.1"
#
##############################################################################

This is the OpenVPN config file of the other side (a Linux server or another WRT54G/GS)

##############################################################################
#
dev tap
secret /etc/openvpn/key.txt
persist-key
persist-tun
ifconfig 10.0.1.1 255.255.255.252
ping-restart 60
ping 10
verb 5
mute 10
lport 5000
route-up "route add -net 192.168.2.0/24 gw 10.0.1.2"
#
###############################################################################

Usage & Troubleshooting

Launching the Client

-cd to the install folder (/<dest_name>/usr/sbin)
-run ./openvpn --config ./../../etc/openvpn/office.conf --log openvpn.log

See openvpn.log for debugging

Load on router startup

-Using a *nix friendly text editor, create openvpn.startup as:

#!/bin/sh
killall -q openvpn
/jffs/usr/sbin/openvpn --config /jffs/etc/openvpn/office.conf

-Follow the instructions in Startup Scripts#Shell Script Method to make your script load on startup.

Using VPN firmware

Web interface of this firmware supports operation as a client to single server only. But using custom initialization commands it may be possible to add connections to more servers or even run a server on this router.

Enabling

OpenVPN client can be enabled via web menu at Administration/Services/OpenVPN Client. Choose "enable" and "Save Settings", then fill in parameters and press "Save Setting" again. Parameters:

Server IP address
IP address of the OpenVPN server you want to work with
Port
port which OpenVPN server listens on
Use LZO Compression
where to use or not compression on vpn traffic; must be the same value as on server
Tunnel protocol
what transport to use to transfer VPN traffic; default is udp, but if routers/nat devices causes problems, choose tcp; must be the same as on server
Public Server Cert
Certificate of OpenVPN CA in pem form; only part between -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- is necessary; as it is stored in nvram, everything else from that file should be removed to conserve space
Public Client Cert
Client certificate issued by CA for this particular router; also only part between 'BEGIN' and 'END' is required
Private Client Key
Key associated with certificate above; should be kept secret because anybody who knows this key can successfully authenticate as this client

Troubleshooting

Correct time

OpenVPN requires client and server to have more or less synchronized time. Therefor make sure that router has correct time. To check it use command date and if you get info about year 1970, you should enable NTP client. Also, ntp server has to be outside of your VPN as time should be corrected before VPN is established. If you have syslog enabled (to local server, or the server outside your VPN), errors like TLS Error: Unroutable control packet received from server_ip:1194 may indicate this problem.


You are here: Main Page/DD-WRT Docu (EN)/OpenVPN