<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3320444321611993428</id><updated>2011-04-21T13:11:51.439-07:00</updated><title type='text'>Linksys WRT</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://linksyswrt.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3320444321611993428/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://linksyswrt.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Atef Digital</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3320444321611993428.post-8950894736033738946</id><published>2008-09-23T16:21:00.000-07:00</published><updated>2008-09-23T16:27:14.166-07:00</updated><title type='text'>Asterisk for OpenWRT</title><content type='html'>Asterisk for OpenWRT&lt;br /&gt;&lt;br /&gt;last updated: september 19, 2007&lt;br /&gt;&lt;br /&gt;This page contains binaries and sources for running the Asterisk PBX software on OpenWRT devices.&lt;br /&gt;&lt;br /&gt;This page has become obsolete since the majority of these patches were merged and improved in the official OpenWRT repositories since version 1.4.11. All requests and bug reports should now be propagated through tickets in the OpenWRT development process. People are strongly advised to use the official repositories for further Asterisk development an installations since there will be no new releases or developement through this site.&lt;br /&gt;&lt;br /&gt;The original repositories for version 1.4.9 are still maintained because of some extra features that have not been merged yet, but will be in the near future.&lt;br /&gt;(obsolete) Asterisk 1.4.9&lt;br /&gt;Asterisk 1.4 packages can be obtained through a package repository by adding a new line to your /etc/ipkg.conf:&lt;br /&gt;&lt;br /&gt;For OpenWRT WhiteRussian 0.9 on mipsel/brcm (Broadcom and compatibles):&lt;br /&gt;  src asterisk14 http://members.home.nl/hans.zandbelt/openwrt/whiterussian/packages/asterisk-1.4&lt;br /&gt;&lt;br /&gt;For OpenWRT Kamikaze 7.06 on mipsel/brcm (Broadcom and compatibles):&lt;br /&gt;  src asterisk14 http://members.home.nl/hans.zandbelt/openwrt/kamikaze/packages/asterisk-1.4&lt;br /&gt;&lt;br /&gt;For OpenWRT Kamikaze 7.06 on mips/atheros (Fonera and compatibles):&lt;br /&gt;  src asterisk14 http://members.home.nl/hans.zandbelt/openwrt/kamikaze/packages/asterisk-1.4/atheros&lt;br /&gt;&lt;br /&gt;For OpenWRT Kamikaze 7.06 on x86:&lt;br /&gt;  src asterisk14 http://members.home.nl/hans.zandbelt/openwrt/kamikaze/packages/asterisk-1.4/x86&lt;br /&gt;&lt;br /&gt;NB1: The 1.4.x packages are named "asterisk14-*" to allow them to co-exist with the 1.2.x packages, *BUT* the 1.4 packages _do_ use the same installation directories so installing them next to 1.2 must be done with a different "-d" flag to "ipkg install".&lt;br /&gt;NB2: For the Kamikaze releases based on kernel 2.6 the zaptel/ztdummy kernel module is not yet available thus app_meetme and IAX2 trunking are not yet usable on that platform.&lt;br /&gt;&lt;br /&gt;Update: Asterisk core updated to version 1.4.9; added asterisk-addons 1.4.2 zaptel-libtonezone updated to version 1.4.4.&lt;br /&gt;asterisk14-addons includes backported-from-trunk chan_mobile (svn 384)&lt;br /&gt;asterisk14-app-fax package is included, including app_rxfax and app_txfax.&lt;br /&gt;asterisk14-chan-gtalk is included, with stability fixes, providing GTalk support for Asterisk.&lt;br /&gt;(obsolete) Building from source&lt;br /&gt;You can build Asterisk 1.4.9 and addons for OpenWRT yourself, together with all supported modules, using the buildroot environment provided by the OpenWRT team, called the SDK. The script for doing so (download) :&lt;br /&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;ZAPTEL="1.4.4"&lt;br /&gt;IKSEMEL="1.2"&lt;br /&gt;ASTERISK="1.4.9"&lt;br /&gt;ADDONS="1.4.2"&lt;br /&gt;&lt;br /&gt;URL="http://zandbelt.dyndns.org/asterisk"&lt;br /&gt;PREFIX="openwrt-packages"&lt;br /&gt;&lt;br /&gt;DIR="openwrt-devel"&lt;br /&gt;SDK="OpenWrt-SDK-Linux-i686-1"&lt;br /&gt;&lt;br /&gt;do_patch() {&lt;br /&gt;  PATCH=${PREFIX}-$1-$2.patch&lt;br /&gt;  wget ${URL}/${PATCH}&lt;br /&gt;  patch -p0 &lt; ${PATCH}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;mkdir ${DIR} &amp;&amp; cd ${DIR}&lt;br /&gt;wget http://downloads.openwrt.org/whiterussian/newest/${SDK}.tar.bz2&lt;br /&gt;tar jxvf ${SDK}.tar.bz2&lt;br /&gt;svn co https://svn.openwrt.org/openwrt/packages&lt;br /&gt;do_patch zaptel ${ZAPTEL}&lt;br /&gt;do_patch iksemel ${IKSEMEL}&lt;br /&gt;do_patch asterisk ${ASTERISK}&lt;br /&gt;do_patch asterisk-addons ${ADDONS}&lt;br /&gt;cd ${SDK}/package &amp;&amp; ln -s ../../packages/*/* . &amp;&amp; cd ..&lt;br /&gt;make package/asterisk14-compile V=99&lt;br /&gt;make package/asterisk14-addons-compile V=99&lt;br /&gt;&lt;br /&gt;After finishing successfully, packages can be found in:&lt;br /&gt;  openwrt-devel/OpenWrt-SDK-Linux-i686-1/bin/packages&lt;br /&gt;(obsolete) Asterisk 1.2.16&lt;br /&gt;NB: these packages are obsoleted by the 1.4.x ones; people are encouraged to switch to 1.4.x as OpenWRT support for 1.2.x will probably end in the near future. These packages can be obtained through a package repository by adding a new line to your /etc/ipkg.conf:&lt;br /&gt;&lt;br /&gt;  src asterisk http://members.home.nl/hans.zandbelt/openwrt/whiterussian/packages&lt;br /&gt;Installing dummy Zaptel timer support (ztdummy)&lt;br /&gt;This enables MeetMe audio tele-conferencing bridge support and IAX2 trunking.&lt;br /&gt;It is only useful on routers with UHCI USB features such as the Asus WL-500GdL.&lt;br /&gt;&lt;br /&gt;   1. Install kmod-zaptel&lt;br /&gt;   2. Install kmod-usb-uhci-iv&lt;br /&gt;   3. Install asterisk-app-meetme&lt;br /&gt;   4. Remove the alternate USB kernel module (if loaded): rmmod uhci&lt;br /&gt;   5. Insert the required USB module required for Zaptel timer support: insmod ./usb-uhci.o&lt;br /&gt;   6. Insert the Zaptel module: insmod ./zaptel.o&lt;br /&gt;   7. Insert the dummy USB Zaptel timer module: insmod ./ztdumy.o&lt;br /&gt;   8. Install the Asterisk core package (or *-mini ipk for iax2-only support) from the list above.&lt;br /&gt;   9. For tele-conferencing: configure meetme.conf and extensions.conf and make sure the app_meetme.so is loaded.&lt;br /&gt;  10. For trunking: configure iax.conf. &lt;br /&gt;&lt;br /&gt;Have fun with tele-conferencing and/or IAX2 trunking...&lt;br /&gt;Sounds&lt;br /&gt;Here's a package with Dutch (male) voices for Asterisk 1.x, created by Jeroen Naeff from the samples provided by Born Digital.&lt;br /&gt;# asterisk-dutchmale-sounds_0.1_mipsel.ipk&lt;br /&gt;Contact&lt;br /&gt;Preferably send your comments to the OpenWRT forum in one of the topics on Asterisk in the section for Community Releases.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3320444321611993428-8950894736033738946?l=linksyswrt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linksyswrt.blogspot.com/feeds/8950894736033738946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3320444321611993428&amp;postID=8950894736033738946' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3320444321611993428/posts/default/8950894736033738946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3320444321611993428/posts/default/8950894736033738946'/><link rel='alternate' type='text/html' href='http://linksyswrt.blogspot.com/2008/09/asterisk-for-openwrt.html' title='Asterisk for OpenWRT'/><author><name>Atef Digital</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3320444321611993428.post-4160966643301424570</id><published>2008-09-11T07:57:00.000-07:00</published><updated>2008-09-11T08:05:00.758-07:00</updated><title type='text'>OpenVPN - Site-to-Site Bridged VPN Between Two Routers</title><content type='html'>&lt;h3&gt;&lt;span class="mw-headline"&gt;Procedure Summary &lt;/span&gt;&lt;/h3&gt; &lt;ol&gt;&lt;li&gt; Obtain a Linksys WRT54GL router &lt;/li&gt;&lt;li&gt; Install the OpenVPN version of DD-WRT on both routers. NOTE: Use v23 sp3 or greater if you want to connect multiple clients to one server simultaneously. Single client to server works fine with sp2. &lt;/li&gt;&lt;li&gt; Generate the necessary keys for public key authentication &lt;/li&gt;&lt;li&gt; Configure a router as the server &lt;/li&gt;&lt;li&gt; Configure the other router as the client &lt;/li&gt;&lt;li&gt; Test the VPN &lt;/li&gt;&lt;/ol&gt; &lt;a name="Obtain_a_Linksys_WRT54GL_Router"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Obtain a Linksys WRT54GL Router &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;The author has experienced flawless performance from the two Linksys WRT54GL routers he has used to establish a site-to-site VPN. Although other routers will likely work equally well, if you obtain Linksys WRT54GL routers to set up a site-to-site VPN, you can have a high level of confidence that you will be successful. &lt;/p&gt; &lt;a name="Install_DD-WRT_onto_Your_Routers"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Install DD-WRT onto Your Routers&lt;/span&gt;&lt;/h3&gt; &lt;ol&gt;&lt;li&gt; Download the latest stable release of the OpenVPN version of DD-WRT from &lt;a href="http://www.dd-wrt.com/dd-wrtv2/downloads.php" class="external text" title="http://www.dd-wrt.com/dd-wrtv2/downloads.php" rel="nofollow"&gt;DD-WRT&lt;/a&gt;.  At the time this was written, the file you need to download is dd-wrt.v23_vpn_generic.bin. , I use dd-wrt.v23_vpn_wrt54g.bin.  This is sp3. &lt;/li&gt;&lt;/ol&gt; &lt;a name="Generate_Keys_for_Authentication"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Generate Keys for Authentication &lt;/span&gt;&lt;/h3&gt; &lt;ol&gt;&lt;li&gt; Download OpenVPN from &lt;a href="http://openvpn.net/download.html" class="external text" title="http://openvpn.net/download.html" rel="nofollow"&gt;HERE&lt;/a&gt; onto the computer that you are going to use to communicate with (i.e., configure) the routers. &lt;/li&gt;&lt;li&gt; Follow these instructions to &lt;a href="http://openvpn.net/howto.html#install" class="external text" title="http://openvpn.net/howto.html#install" rel="nofollow"&gt;install OpenVPN onto your computer&lt;/a&gt;. &lt;/li&gt;&lt;li&gt; Follow these instructions to &lt;a href="http://openvpn.net/howto.html#pki" class="external text" title="http://openvpn.net/howto.html#pki" rel="nofollow"&gt;generate keys for authentication&lt;/a&gt;.  (Note: when generating the client key, create only one key and name it client, rather than client1.) &lt;/li&gt;&lt;/ol&gt; &lt;a name="Configure_the_Server_Router"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Configure the Server Router &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;&lt;i&gt;Basic Setup&lt;/i&gt; &lt;/p&gt; &lt;ol&gt;&lt;li&gt; Log onto the first router, which will be our server router, using the GUI. &lt;/li&gt;&lt;li&gt; Go to Setup &gt; Basic Setup. &lt;/li&gt;&lt;li&gt; Set the Local IP Address of the first router to 192.168.1.1 with a Subnet Mask of 255.255.255.0. (Of course, you are not required to use the network address 192.168.1.0. You can use any network address you like, but this tutorial will assume you are using this network.) &lt;/li&gt;&lt;li&gt; Make sure DHCP server is enabled. &lt;/li&gt;&lt;li&gt; Set the Start IP Address to 100. &lt;/li&gt;&lt;li&gt; Set Maximum DHCP Users to 50. &lt;/li&gt;&lt;li&gt; Set the Time Zone.  (The time zone you select is not important to the success of this tutorial, but setting the &lt;b&gt;same&lt;/b&gt; time zone on both routers &lt;b&gt;is&lt;/b&gt; important.) &lt;/li&gt;&lt;li&gt; Click Save Settings. &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;i&gt;Startup Script&lt;/i&gt; &lt;/p&gt; &lt;ol&gt;&lt;li&gt; Go to Administration &gt; Commands &lt;/li&gt;&lt;li&gt; Paste the following into the Command Shell box: &lt;/li&gt;&lt;/ol&gt; &lt;pre&gt;cd /tmp&lt;br /&gt;openvpn --mktun --dev tap0&lt;br /&gt;brctl addif br0 tap0&lt;br /&gt;ifconfig tap0 0.0.0.0 promisc up&lt;br /&gt;&lt;br /&gt;echo "&lt;br /&gt;# Tunnel options&lt;br /&gt;mode server       # Set OpenVPN major mode&lt;br /&gt;proto udp         # Setup the protocol (server)&lt;br /&gt;port 1194         # TCP/UDP port number&lt;br /&gt;dev tap0          # TUN/TAP virtual network device&lt;br /&gt;keepalive 15 60   # Simplify the expression of --ping&lt;br /&gt;daemon            # Become a daemon after all initialization&lt;br /&gt;verb 3            # Set output verbosity to n&lt;br /&gt;comp-lzo          # Use fast LZO compression&lt;br /&gt;&lt;br /&gt;# OpenVPN server mode options&lt;br /&gt;client-to-client  # tells OpenVPN to internally route client-to-client traffic&lt;br /&gt;duplicate-cn      # Allow multiple clients with the same common name&lt;br /&gt;&lt;br /&gt;# TLS Mode Options&lt;br /&gt;tls-server        # Enable TLS and assume server role during TLS handshake&lt;br /&gt;ca ca.crt         # Certificate authority (CA) file&lt;br /&gt;dh dh1024.pem     # File containing Diffie Hellman parameters&lt;br /&gt;cert server.crt   # Local peer's signed certificate&lt;br /&gt;key server.key    # Local peer's private key&lt;br /&gt;" &gt; openvpn.conf&lt;br /&gt;&lt;br /&gt;echo "&lt;br /&gt;-----BEGIN CERTIFICATE-----&lt;br /&gt;INSERT YOUR ca.crt HERE&lt;br /&gt;-----END CERTIFICATE-----&lt;br /&gt;" &gt; ca.crt&lt;br /&gt;echo "&lt;br /&gt;-----BEGIN RSA PRIVATE KEY-----&lt;br /&gt;INSERT YOUR server.key HERE&lt;br /&gt;-----END RSA PRIVATE KEY-----&lt;br /&gt;" &gt; server.key&lt;br /&gt;chmod 600 server.key&lt;br /&gt;echo "&lt;br /&gt;-----BEGIN CERTIFICATE-----&lt;br /&gt;INSERT YOUR server.crt HERE&lt;br /&gt;-----END CERTIFICATE-----&lt;br /&gt;" &gt; server.crt&lt;br /&gt;echo "&lt;br /&gt;-----BEGIN DH PARAMETERS-----&lt;br /&gt;INSERT YOUR dh1024.pem HERE&lt;br /&gt;-----END DH PARAMETERS-----&lt;br /&gt;" &gt; dh1024.pem&lt;br /&gt;&lt;br /&gt;sleep 5&lt;br /&gt;ln -s /usr/sbin/openvpn /tmp/myvpn&lt;br /&gt;/tmp/myvpn --config openvpn.conf&lt;br /&gt;&lt;br /&gt;route add -net 192.168.1.0/24 dev br0&lt;br /&gt;&lt;/pre&gt; &lt;ol&gt;&lt;li&gt; Replace the "INSERT YOUR [FILE] HERE" text with the appropriate text from the .crt or .key files you generated during the Generate Keys for Authentication step. &lt;/li&gt;&lt;li&gt; Click Save Startup &lt;/li&gt;&lt;li&gt; Paste the following into the Command Shell box: &lt;/li&gt;&lt;/ol&gt; &lt;pre&gt;/usr/sbin/iptables -I INPUT -p udp --dport 1194 -j ACCEPT&lt;br /&gt;&lt;/pre&gt; &lt;ol&gt;&lt;li&gt; Click Save Firewall &lt;/li&gt;&lt;li&gt; Reboot the router &lt;/li&gt;&lt;/ol&gt; &lt;a name="Configure_the_Client_Router"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt; Configure the Client Router &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;&lt;i&gt;Basic Setup&lt;/i&gt; &lt;/p&gt; &lt;ol&gt;&lt;li&gt; Log onto the second router, which will be our client router, using the GUI. &lt;/li&gt;&lt;li&gt; Go to Setup &gt; Basic Setup. &lt;/li&gt;&lt;li&gt; Set the Local IP Address of the second router to 192.168.1.254 with a Subnet Mask of 255.255.255.0. (Of course, if you used a different network address and subnet mask when setting up the server router, use that same address and mask for this router.) &lt;/li&gt;&lt;li&gt; Make sure DHCP server is enabled. &lt;/li&gt;&lt;li&gt; Set the Start IP Address to 50. NOTE: All the IP addresses of the client LAN and the server LAN must all be unique. You can't have 192.168.1.100 on the client LAN and 192.168.1.100 on the server LAN. In this case, all would be 192.168.1.x. Router IP addresses must also be different but must be 192.168.1.x as well. If you have multiple routers as simultaneous clients, all client's LAN IP addresses must be unique in the same way. Watch out that your DHCP assignments cannot create duplicate addresses. &lt;/li&gt;&lt;li&gt; Set Maximum DHCP Users to 50. &lt;/li&gt;&lt;li&gt; Set the Time Zone to the same time zone you set on the first (server) router. &lt;/li&gt;&lt;li&gt; Click Save Settings. &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;i&gt;Startup Script&lt;/i&gt; &lt;/p&gt; &lt;ol&gt;&lt;li&gt; Go to Administration &gt; Commands &lt;/li&gt;&lt;li&gt; Paste the following into the Command Shell box: &lt;/li&gt;&lt;/ol&gt; &lt;pre&gt;cd /tmp&lt;br /&gt;ln -s /usr/sbin/openvpn /tmp/myvpn&lt;br /&gt;./myvpn --mktun --dev tap0&lt;br /&gt;brctl addif br0 tap0&lt;br /&gt;ifconfig tap0 0.0.0.0 promisc up&lt;br /&gt;sleep 5&lt;br /&gt;&lt;br /&gt;echo "&lt;br /&gt;client&lt;br /&gt;daemon&lt;br /&gt;dev tap0&lt;br /&gt;proto udp&lt;br /&gt;remote xxx.xxx.xxx.xxx 1194&lt;br /&gt;resolv-retry infinite&lt;br /&gt;nobind&lt;br /&gt;persist-key&lt;br /&gt;persist-tun&lt;br /&gt;ca ca.crt&lt;br /&gt;cert client.crt&lt;br /&gt;key client.key&lt;br /&gt;ns-cert-type server&lt;br /&gt;comp-lzo&lt;br /&gt;verb 3&lt;br /&gt;" &gt; /tmp/client.conf&lt;br /&gt;&lt;br /&gt;echo "&lt;br /&gt;-----BEGIN CERTIFICATE-----&lt;br /&gt;INSERT YOUR ca.crt HERE&lt;br /&gt;-----END CERTIFICATE-----&lt;br /&gt;" &gt; /tmp/ca.crt&lt;br /&gt;&lt;br /&gt;echo "&lt;br /&gt;-----BEGIN RSA PRIVATE KEY-----&lt;br /&gt;INSERT YOUR client.key HERE&lt;br /&gt;-----END RSA PRIVATE KEY-----&lt;br /&gt;" &gt; /tmp/client.key&lt;br /&gt;chmod 600 /tmp/client.key&lt;br /&gt;&lt;br /&gt;echo "&lt;br /&gt;-----BEGIN CERTIFICATE-----&lt;br /&gt;INSERT YOUR client.crt HERE&lt;br /&gt;-----END CERTIFICATE-----&lt;br /&gt;" &gt; /tmp/client.crt&lt;br /&gt;&lt;br /&gt;./myvpn --config client.conf&lt;br /&gt;&lt;br /&gt;route add -net 192.168.1.0/24 dev br0&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;&lt;b&gt;UPD from hryamzik:&lt;/b&gt; This script didn't work for me. I've composed the folowing: &lt;/p&gt; &lt;pre&gt;cd /tmp&lt;br /&gt;ln -s /usr/sbin/openvpn /tmp/myvpn&lt;br /&gt;./myvpn --mktun --dev tap0&lt;br /&gt;brctl addif br0 tap0&lt;br /&gt;ifconfig tap0 promisc&lt;br /&gt;&lt;br /&gt;cat &lt;&lt;eof&gt; /tmp/up.sh&lt;br /&gt;/sbin/ifconfig tap0 0.0.0.0&lt;br /&gt;EOF&lt;br /&gt;&lt;br /&gt;chmod +x /tmp/up.sh&lt;br /&gt;&lt;br /&gt;echo "&lt;br /&gt;daemon            # Become a daemon after all initialization&lt;br /&gt;client&lt;br /&gt;dev tap0&lt;br /&gt;proto udp&lt;br /&gt;remote domain.comt 1194&lt;br /&gt;resolv-retry infinite&lt;br /&gt;nobind&lt;br /&gt;persist-key&lt;br /&gt;persist-tun&lt;br /&gt;ca ca.crt&lt;br /&gt;cert client.crt&lt;br /&gt;key client.key&lt;br /&gt;comp-lzo&lt;br /&gt;verb 3&lt;br /&gt;mssfix 1200&lt;br /&gt;up \"/tmp/up.sh\"&lt;br /&gt;" &gt; client.conf&lt;br /&gt;&lt;br /&gt;echo "&lt;br /&gt;-----BEGIN CERTIFICATE-----&lt;br /&gt;&lt;br /&gt;-----END CERTIFICATE-----&lt;br /&gt;" &gt; ca.crt&lt;br /&gt;echo "&lt;br /&gt;-----BEGIN RSA PRIVATE KEY-----&lt;br /&gt;&lt;br /&gt;-----END RSA PRIVATE KEY-----&lt;br /&gt;" &gt; /tmp/client.key&lt;br /&gt;chmod 600 /tmp/client.key&lt;br /&gt;&lt;br /&gt;echo "&lt;br /&gt;-----BEGIN CERTIFICATE-----&lt;br /&gt;&lt;br /&gt;-----END CERTIFICATE-----&lt;br /&gt;" &gt; /tmp/client.crt&lt;br /&gt;&lt;br /&gt;./myvpn --config client.conf&lt;br /&gt;&lt;br /&gt;route add -net 192.168.1.0/24 dev br0&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;Be carefull with "route add", I had some problems with it when used wrong values. I did &lt;b&gt;not&lt;/b&gt; updated iptables. &lt;/p&gt;&lt;p&gt;&lt;b&gt;End of upd by hryamzik.&lt;/b&gt; &lt;/p&gt; &lt;ol&gt;&lt;li&gt; Replace the "INSERT YOUR [FILE] HERE" text with the appropriate text from the .crt or .key files you generated during the Generate Keys for Authentication step. &lt;/li&gt;&lt;li&gt; Replace the xxx.xxx.xxx.xxx text with the public IP address (or DNS name) of your first (server) router. (Note: if your Internet Service Provider gives your routers dynamic IP addresses (and they probably do), you might want to look into Dynamic DNS services such as &lt;a href="http://www.dyndns.com/" class="external text" title="http://www.dyndns.com" rel="nofollow"&gt;DynDNS&lt;/a&gt; or &lt;a href="http://www.no-ip.com/" class="external text" title="http://www.no-ip.com" rel="nofollow"&gt;No-IP.com&lt;/a&gt;.  You can start to learn more about dynamic DNS by looking at &lt;a href="http://linksyswrt.blogspot.com/2008/09/dynamic-dns.html"&gt;this page&lt;/a&gt;&lt;/li&gt;&lt;li&gt; Click Save Startup &lt;/li&gt;&lt;li&gt; Reboot the router (i.e., In the GUI, click Administration &gt; Management and click Reboot Router at the bottom) &lt;/li&gt;&lt;/ol&gt; &lt;a name="Test_the_VPN"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Test the VPN &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;If all is well, and a VPN has been established between your two routers, you should be able to ping hosts behind either router. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3320444321611993428-4160966643301424570?l=linksyswrt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linksyswrt.blogspot.com/feeds/4160966643301424570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3320444321611993428&amp;postID=4160966643301424570' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3320444321611993428/posts/default/4160966643301424570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3320444321611993428/posts/default/4160966643301424570'/><link rel='alternate' type='text/html' href='http://linksyswrt.blogspot.com/2008/09/openvpn-site-to-site-bridged-vpn.html' title='OpenVPN - Site-to-Site Bridged VPN Between Two Routers'/><author><name>Atef Digital</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3320444321611993428.post-8664099206465840855</id><published>2008-09-11T07:47:00.000-07:00</published><updated>2008-09-11T07:55:23.387-07:00</updated><title type='text'>Dynamic DNS</title><content type='html'>&lt;p&gt;&lt;a style="font-weight: bold;" href="http://www.dd-wrt.com/wiki/index.php/Glossary#Dynamic_DNS_.28DDNS.29" title="Glossary"&gt;Dynamic DNS (DDNS)&lt;/a&gt; is a DNS caching service &lt;/p&gt;&lt;p&gt;DD-WRT v23 SP2 and later use &lt;a href="http://inadyn.ina-tech.net/" class="external text" title="http://inadyn.ina-tech.net/" rel="nofollow"&gt;inadyn&lt;/a&gt; as its embedded dyndns client solution. &lt;/p&gt;&lt;p&gt;Here's a list of Dynamic DNS service providers: &lt;/p&gt;&lt;a href="http://www.dyndns.com/" class="external free" title="http://www.dyndns.com" rel="nofollow"&gt;http://www.dyndns.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.easydns.com/" class="external free" title="http://www.easydns.com" rel="nofollow"&gt;http://www.easydns.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://freedns.afraid.org/" class="external free" title="http://freedns.afraid.org" rel="nofollow"&gt;http://freedns.afraid.org&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.no-ip.com/" class="external free" title="http://www.no-ip.com" rel="nofollow"&gt;http://www.no-ip.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.tzo.com/" class="external free" title="http://www.tzo.com" rel="nofollow"&gt;http://www.tzo.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.zoneedit.com/" class="external free" title="http://www.zoneedit.com" rel="nofollow"&gt;http://www.zoneedit.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.changeip.com/" class="external free" title="http://www.ChangeIP.com" rel="nofollow"&gt;http://www.ChangeIP.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;&lt;span class="mw-headline"&gt;Configuration &lt;/span&gt;&lt;/h1&gt; &lt;a name="Predefined"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Predefined &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;DD-WRT provides a set of predefined configurations for the most common DDNS services. After choosing from one of the predefined DDNS services, you have to provide the "User Name" and the "Password" for the account of your DDNS service. In the "Host Name" field, you have to enter the fully qualified name of you dynamic domain (e.g. myhostname.example.org). &lt;/p&gt; &lt;a name="Multiple_DDNS_host_names"&gt;&lt;/a&gt;&lt;h4&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Multiple DDNS host names &lt;/span&gt;&lt;/h4&gt; &lt;p&gt;If you have multiple host names registered at your DDNS service, you can enter them in the "Host Name" field using the "-a" option. &lt;/p&gt;&lt;p&gt;Example: You want to update the IP address for myhostname1.example.org, myhostname2.example.org and myhostname3.example.org; in this case, you have to enter in the "Host Name" field the following string: "myhostname1.example.org -a myhostname2.example.org -a myhostname3.example.org". (Note: no "-a" for the first host name.) &lt;/p&gt; &lt;a name="Custom_.28URL_Updates.29"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt; &lt;span class="mw-headline"&gt;Custom (URL Updates) &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;With url updates, the client program usually submits a request using the hypertext transport protocal (HTTP) to a DDNS Server. The request may contain your requested hostname (your dynamic domain name) and/or your IP address. The server then asks for the username and password. The client program returns the information to authorize itself, and the update is completed with the server request response to verify the result. &lt;/p&gt;&lt;p&gt;When your DDNS Service provider uses URL updates, you need to know the url which the client program requests. An example of such a url is: &lt;/p&gt;&lt;p&gt;&lt;a href="http://example.com/dyndns/update?hostname=hostname.example.org&amp;amp;ip=1.2.3.4" class="external free" title="http://example.com/dyndns/update?hostname=hostname.example.org&amp;amp;ip=1.2.3.4" rel="nofollow"&gt;http://example.com/dyndns/update?hostname=hostname.example.org&amp;amp;ip=1.2.3.4&lt;/a&gt; &lt;/p&gt;&lt;p&gt;The URL is divided into parts, the parts should be simple to divide. &lt;/p&gt; &lt;table border="1" cellpadding="5" cellspacing="0"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt; Protocol &lt;/td&gt;&lt;td&gt; Usually appears first and is followed by "://" &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Location &lt;/td&gt;&lt;td&gt; Usually after protocol, this can be an IP address or a domain name &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; Port (optional) &lt;/td&gt;&lt;td&gt; Sometimes appears after location, only appears after a colon. &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; URI &lt;/td&gt;&lt;td&gt; The last part of the URL, which can be subdivided. It normally appears after the location and port. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;The URI can be subdivided even futher. Most of the URI is optional. &lt;/p&gt; &lt;table border="1" cellpadding="5" cellspacing="0"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt; URI Location &lt;/td&gt;&lt;td&gt; Everything before the "?" or "#" ("?" first). &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; URI Parameters &lt;/td&gt;&lt;td&gt; Everything after the "?" and before the "#". There can be many parameters. Many times, as in the above example is it specified in the "name=value" form. And commonly when more than one value needs to be specified, it is divided with "&amp;amp;" so "name1=value1&amp;amp;name2=value2&amp;amp;name3=value3" can be used to specify three parameters. &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; URI Link &lt;/td&gt;&lt;td&gt; Everything after the "#", used to specify a specific point in a page. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;The example request above is: &lt;/p&gt; &lt;table border="1" cellpadding="5" cellspacing="0"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt;Protocol &lt;/td&gt;&lt;td&gt;http &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Location &lt;/td&gt;&lt;td&gt;example.com &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Port &lt;/td&gt;&lt;td&gt;Not specified &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;URI &lt;/td&gt;&lt;td&gt;/dyndns/update?hostname=hostname.example.org &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;URI Location &lt;/td&gt;&lt;td&gt;/dyndns/update &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;URI Paramater "hostname" &lt;/td&gt;&lt;td&gt;hostname.example.org &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;To confirm that you have the correct URL and can manually update your IP by using your web browser. When prompted, input your registered username and password. If you aren't registered, register one and setup (add) your dynamic domain name first. Once you have the information, you should be able to set it up using DD-WRT. &lt;/p&gt; &lt;ol&gt;&lt;li&gt; Login to the Web GUI, Set DDNS under "Setup" to "custom" &lt;/li&gt;&lt;li&gt; If the URL paramaters have "hostname" use "dyndns@dyndns.org" for DNS System. Otherwise use "custom@http_svr_basic_auth" &lt;/li&gt;&lt;li&gt; Enter "Username" and "Password" with your registered username and password of your DDNS service provider. &lt;/li&gt;&lt;li&gt; Fill in your hostname in "Host Name" &lt;/li&gt;&lt;li&gt; Complete options in "Additional DDNS Options" textarea. &lt;/li&gt;&lt;li&gt; Save Changes and Reboot Router &lt;/li&gt;&lt;/ol&gt; &lt;a name="Additional_DDNS_Options"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;[&lt;a href="http://www.dd-wrt.com/wiki/index.php?title=Dynamic_DNS&amp;amp;action=edit&amp;amp;section=5" title="Edit section: Additional DDNS Options"&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class="mw-headline"&gt; Additional DDNS Options &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;For the custom DDNS to work properly we must specify options so that the program knows what to do.  &lt;/p&gt; &lt;ul&gt;&lt;li&gt; Specify the Server Name option, this is Location and perhaps the port (if specified) of the URL. &lt;/li&gt;&lt;li&gt; Specify Server URL Option. If you used the "dyndns@dyndns.org" as "DNS System" you need to specify the Server URL option as just the URI Location; otherwise you need to specify the entire URI. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Using the example above, the Additional DDNS Options should be: &lt;/p&gt;&lt;p&gt;" --dyndns_server_name example.com --dyndns_server_url /dyndns/update" &lt;/p&gt;&lt;p&gt;If this isn't working, try pinging checkip.dyndns.org. You may have to use the "ip_server_name" option if you are unable to recieve a response. The IP address option is used to specify an alternate source to get your IP. Many websites have options to view your IP Address. For the update to work properly, the IP Address check must be be done on the server side (no javascript/vbscript) and your ip address must be the first address on the page. You may need to confirm this by using "View Source" in your browser. &lt;/p&gt;&lt;p&gt;Example: &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.dnsstuff.com/tools/my-ip-address.ch" class="external free" title="http://www.dnsstuff.com/tools/my-ip-address.ch" rel="nofollow"&gt;http://www.dnsstuff.com/tools/my-ip-address.ch&lt;/a&gt; &lt;/p&gt;&lt;p&gt;Dividing this URL is similar to dividing the one above: &lt;/p&gt; &lt;table border="1" cellpadding="5" cellspacing="0"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt;Protocol &lt;/td&gt;&lt;td&gt;http &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Location &lt;/td&gt;&lt;td&gt;www.dnsstuff.com &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Port &lt;/td&gt;&lt;td&gt;Not specified &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;URI &lt;/td&gt;&lt;td&gt;/tools/my-ip-address.ch &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;URI Location &lt;/td&gt;&lt;td&gt;/tools/my-ip-address.ch &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;The "ip_server_name" option uses the Location and the URI. If there is not a URI, use "/" &lt;/p&gt;&lt;p&gt;The "ip_server_name" string using the server above should be: &lt;/p&gt;&lt;p&gt;"--ip_server_name www.dnsstuff.com /tools/my-ip-address.ch" &lt;/p&gt;&lt;p&gt;Note the space beteen the Location and URI. &lt;/p&gt;&lt;p&gt;If you have multiple dyndns domains under the same account and need to update them together, you can add one or more "-a" options to do so. ie, "-a SECOND_HOSTNAME.example.com". This only works if the domains are under the same provider and account. &lt;/p&gt;&lt;p&gt;So, finally, the additional options should be complete and will work in general cases. &lt;/p&gt; &lt;a name="Examples"&gt;&lt;/a&gt;&lt;h2&gt;&lt;span class="editsection"&gt;&lt;/span&gt; &lt;span class="mw-headline"&gt;Examples&lt;/span&gt;&lt;/h2&gt; &lt;a name="dnspark.com"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;dnspark.com &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;&lt;a href="http://www.dnspark.com/" class="external text" title="http://www.dnspark.com" rel="nofollow"&gt;dnspark.com&lt;/a&gt;&lt;br /&gt;This configuration may be correct.&lt;br /&gt;DDNS Service: Custom&lt;br /&gt;DYNDNS Server: www.dnspark.net &lt;br /&gt;Username:  your ddns' username&lt;br /&gt;Password: your ddns' password&lt;br /&gt;Host Name: your domain&lt;br /&gt;URL: /api/dynamic/update.php?mx=ON&amp;amp;mxpri=5&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;a name="3222.org"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;3222.org &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;Example option for 3322.org (a chinese dyndns provider) &lt;/p&gt;&lt;p&gt;Username: USERNAME Password: PASSWORD Registered Dynamic Domain Name: SAMPLEHOSTNAME.3322.org &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.3322.org/dyndnspage/protocol.html" class="external text" title="http://www.3322.org/dyndnspage/protocol.html" rel="nofollow"&gt;3322.org Updating Methods&lt;/a&gt; typical url: &lt;a href="http://www.3322.org/dyndns/update?system=dyndns&amp;amp;hostname=SAMPLEHOSTNAME.3322.org" class="external free" title="http://www.3322.org/dyndns/update?system=dyndns&amp;amp;hostname=SAMPLEHOSTNAME.3322.org" rel="nofollow"&gt;http://www.3322.org/dyndns/update?system=dyndns&amp;amp;hostname=SAMPLEHOSTNAME.3322.org&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.3322.org/dyndnspage/client.html" class="external autonumber" title="http://www.3322.org/dyndnspage/client.html" rel="nofollow"&gt;&lt;br /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;option string, using a chinese ip_server &lt;/p&gt;&lt;p&gt;using dyndns@dyndns.org " --dyndns_server_name www.3322.org --dyndns_server_url /dyndns/update? --ip_server_name www.bliao.com:2000 /ip.phtml " &lt;/p&gt;&lt;p&gt;using custom@http_svr_basic_auth: " --dyndns_server_name www.3322.org --dyndns_server_url /dyndns/update?hostname= --ip_server_name www.bliao.com:2000 /ip.phtml " &lt;/p&gt; &lt;a name="freedns.afraid.org"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;freedns.afraid.org &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;DDNS Service: freedns.afraid.org &lt;/p&gt;&lt;p&gt;User Name: USERNAME &lt;/p&gt;&lt;p&gt;Password: PASSWORD &lt;/p&gt;&lt;p&gt;Host Name: yourdomain.com,EntireHashValueAfterTheQuestionMarkTakenFromAfraidDotOrgScript &lt;/p&gt;&lt;p&gt;Force Update Interval 10 &lt;/p&gt; &lt;a name="DNS-O-Matic"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;DNS-O-Matic &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;&lt;a href="http://www.dnsomatic.com/" class="external text" title="http://www.dnsomatic.com/" rel="nofollow"&gt;DNS-O-Matic&lt;/a&gt; provides you a free and easy way to announce your dynamic IP changes to multiple services with a single update. Using DNS-O-Matic allows you to pick and choose what Dynamic DNS services you want to notify, all from one easy to use interface. &lt;/p&gt;&lt;p&gt;More info can be &lt;a href="http://www.dd-wrt.com/phpBB2/viewtopic.php?t=23863" class="external text" title="http://www.dd-wrt.com/phpBB2/viewtopic.php?t=23863" rel="nofollow"&gt;found in the forums&lt;/a&gt;. Using DNS-O-Matic is an easy way to update your favorite dynamic dns service and OpenDNS (which currently does not work with dd-wrt's built in inadyn). &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;DDNS Service&lt;/b&gt;: Custom&lt;br /&gt;&lt;b&gt;DYNDNS Server&lt;/b&gt;: updates.dnsomatic.com&lt;br /&gt;&lt;b&gt;User Name&lt;/b&gt;: your dns-o-matic username&lt;br /&gt;&lt;b&gt;Password&lt;/b&gt;: your dns-o-matic password&lt;br /&gt;&lt;b&gt;Host Name&lt;/b&gt;: all.dnsomatic.com&lt;br /&gt;&lt;b&gt;URL&lt;/b&gt;: /nic/update?&lt;br /&gt;&lt;/p&gt; &lt;a name="DynDNS"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;DynDNS &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;Note that as of v23, using DDNS in DD-WRT will not allow updates to the DynDNS server using the pre-set DynDNS settings. You must set settings to Custom, and following all instructions below. &lt;/p&gt;&lt;p&gt;The below is my setting for dynamic DDNS using dyndns.org  &lt;/p&gt; &lt;ul&gt;&lt;li&gt; substitute your account setting for those in quotes  &lt;/li&gt;&lt;/ul&gt; &lt;table border="1" cellpadding="5" cellspacing="0"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt;DDNS Service &lt;/td&gt;&lt;td&gt;Custom &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;DYNDNS Server &lt;/td&gt;&lt;td&gt;members.dyndns.org &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;User name &lt;/td&gt;&lt;td&gt;'Your DynDNS username' &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Password &lt;/td&gt;&lt;td&gt;'Your DynDNS password' &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Hostname &lt;/td&gt;&lt;td&gt;'Your DynDNS hostname' &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;URL &lt;/td&gt;&lt;td&gt;/nic/update? &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Additional DDNS Options &lt;/td&gt;&lt;td&gt; --dyndns_system dyndns@dyndns.org --ip_server_name checkip.dyndns.org:8245 / &lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;If static DNS is used, use statdns@dyndns.org instead of dyndns@dyndns.org. &lt;/p&gt; &lt;a name="EveryDNS"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;EveryDNS &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;&lt;a href="http://www.everydns.net/" class="external text" title="http://www.everydns.net" rel="nofollow"&gt;EveryDNS&lt;/a&gt; is a basic free dynamic DNS provider. &lt;/p&gt; &lt;table border="1" cellpadding="5" cellspacing="0"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt;DDNS Service: &lt;/td&gt;&lt;td&gt;Custom &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;DYNDNS Server: &lt;/td&gt;&lt;td&gt;dyn.everydns.net &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Username: &lt;/td&gt;&lt;td&gt;'Your EveryDNS Username' &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Password: &lt;/td&gt;&lt;td&gt;'Your EveryDNS Password' &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Host Name: &lt;/td&gt;&lt;td&gt;'Your Domain Name' &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;URL: &lt;/td&gt;&lt;td&gt;/index.php? &lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;a name="Edit_DNS"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Edit DNS &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;&lt;a href="http://www.editdns.org/" class="external text" title="http://www.editdns.org" rel="nofollow"&gt;EditDNS&lt;/a&gt; &lt;/p&gt; &lt;table border="1" cellpadding="5" cellspacing="0"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt;DDNS Service: &lt;/td&gt;&lt;td&gt;Custom &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;DYNDNS Server: &lt;/td&gt;&lt;td&gt;dyndns.editdns.net &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Username: &lt;/td&gt;&lt;td&gt;'Your Email' &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Password: &lt;/td&gt;&lt;td&gt;'Your Password'  (optional?) &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Host Name: &lt;/td&gt;&lt;td&gt;'Your Domain Name' &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;URL: &lt;/td&gt;&lt;td&gt;/api/dynLinux.php?p=&lt;password&gt;&amp;amp;r= &lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;a name="NameCheap"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;NameCheap &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;&lt;a href="http://www.namecheap.com/" class="external text" title="http://www.namecheap.com" rel="nofollow"&gt;NameCheap&lt;/a&gt; is a domain registrar that includes free dynamic dns with the host registration. Under $10/year. NameCheap doesn't use normal http auth for updating, so you have to include your domain and password in the URL. &lt;/p&gt; &lt;table border="1" cellpadding="5" cellspacing="0"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt;DDNS Service: &lt;/td&gt;&lt;td&gt;Custom &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;DYNDNS Server: &lt;/td&gt;&lt;td&gt;dynamicdns.park-your-domain.com &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Username: &lt;/td&gt;&lt;td&gt;(not used) &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Password: &lt;/td&gt;&lt;td&gt;(not used) &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Host Name: &lt;/td&gt;&lt;td&gt;'Your subdomain (or @ for none)' &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;URL: &lt;/td&gt;&lt;td&gt;/update?domain=[your domain]&amp;amp;password=[your password]&amp;amp;host= &lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;a name="DNSexit"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt; DNSexit &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;&lt;a href="http://www.dnsexit.com/" class="external text" title="http://www.dnsexit.com/" rel="nofollow"&gt;DNSexit&lt;/a&gt; is a domain registrar that provides free to top level domains for both business and internet users. &lt;/p&gt; &lt;table border="1" cellpadding="5" cellspacing="0"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt;DDNS Service: &lt;/td&gt;&lt;td&gt;Custom &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;DYNDNS Server: &lt;/td&gt;&lt;td&gt;www.dnsexit.com &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Username: &lt;/td&gt;&lt;td&gt;BOGUS &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Password: &lt;/td&gt;&lt;td&gt;BOGUS &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Host Name: &lt;/td&gt;&lt;td&gt;'Your Domain Name' &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;URL: &lt;/td&gt;&lt;td&gt;/RemoteUpdate.sv?login=USERNAME&amp;amp;password=PASSWORD&amp;amp;host= &lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;a name="CHANGEIP.COM"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;CHANGEIP.COM &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;The information below is how to configure your router to update &lt;a href="http://www.changeip.com/" class="external text" title="http://www.changeip.com" rel="nofollow"&gt;www.ChangeIP.com&lt;/a&gt; dynamic dns hostnames:  &lt;/p&gt; &lt;ul&gt;&lt;li&gt; substitute your account setting for those in quotes  &lt;/li&gt;&lt;/ul&gt; &lt;table border="1" cellpadding="5" cellspacing="0"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt;DDNS Service &lt;/td&gt;&lt;td&gt;Custom &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;DYNDNS Server &lt;/td&gt;&lt;td&gt;nic.changeip.com &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;User name &lt;/td&gt;&lt;td&gt;'Your ChangeIP.com username' &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Password &lt;/td&gt;&lt;td&gt;'Your ChangeIP.com password' &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Hostname &lt;/td&gt;&lt;td&gt;'Your DynDNS hostname' or '*1' for Group #1 &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;URL &lt;/td&gt;&lt;td&gt;/nic/update?system=dyndns&amp;amp;hostname= &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Additional DDNS Options &lt;/td&gt;&lt;td&gt; --ip_server_name ip.changeip.com &lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;a name="Give_UP.3F"&gt;&lt;/a&gt;&lt;h2&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt; Give UP? &lt;/span&gt;&lt;/h2&gt; &lt;p&gt;I gave up on trying to setup my freedns.afraid.org setup and just set a cron script at startup to use freedns' wget method of updating my dns every 5 minutes on the router. If this does not work for you, some variation on this theme might: &lt;/p&gt; &lt;pre&gt;echo '*/5 * * * * root /usr/bin/wget &lt;a href="http://freedns.afraid.org/dynamic/index.php?action=script&amp;amp;data_id=XXXXXX" class="external free" title="http://freedns.afraid.org/dynamic/index.php?action=script&amp;amp;data_id=XXXXXX" rel="nofollow"&gt;http://freedns.afraid.org/dynamic/index.php?action=script&amp;amp;data_id=XXXXXX&lt;/a&gt; -o - &gt;/dev/null 2&gt;&amp;amp;1' &gt;&gt; /tmp/crontab&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;NOTE: In the above, the XXXXXX is an id number provided by freedns.afraid.org &lt;/p&gt; &lt;a name="Debugging_your_configuration"&gt;&lt;/a&gt;&lt;h1&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Debugging your configuration &lt;/span&gt;&lt;/h1&gt; &lt;p&gt;Internaly, DD-WRT uses inadyn and creates in the directory /tmp/ddns a configuration file from your settings in the web form. To check whether the expected configuration file is created from your settings in the web form, you can inspect this file as follows: &lt;/p&gt; &lt;ul&gt;&lt;li&gt; ssh or telnet to the router  &lt;/li&gt;&lt;li&gt; navigate to /tmp/ddns: cd /tmp/ddns &lt;/li&gt;&lt;li&gt; inspect file inadyn.conf: cat /tmp/ddns/inadyn.conf  &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;If you are not familiar with the format of the inadyn.conf file, you can just call /usr/sbin/inadyn from the command line and the allowed parameters are shown. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3320444321611993428-8664099206465840855?l=linksyswrt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linksyswrt.blogspot.com/feeds/8664099206465840855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3320444321611993428&amp;postID=8664099206465840855' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3320444321611993428/posts/default/8664099206465840855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3320444321611993428/posts/default/8664099206465840855'/><link rel='alternate' type='text/html' href='http://linksyswrt.blogspot.com/2008/09/dynamic-dns.html' title='Dynamic DNS'/><author><name>Atef Digital</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3320444321611993428.post-7366486339284706565</id><published>2008-09-11T07:41:00.000-07:00</published><updated>2008-09-11T08:10:29.712-07:00</updated><title type='text'>OpenVPN - Site-to-Site routed VPN between two routers</title><content type='html'>The following details the procedure for establishing a site-to-site routed VPN between two DD-WRT/vpn image enabled routers. The author tried the config on two Linksys WRT54GL(v1.1)&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;span class="mw-headline"&gt;Procedure Summary &lt;/span&gt;&lt;/h2&gt; &lt;ol&gt;&lt;li&gt; Router Preparation. &lt;/li&gt;&lt;li&gt; Install OpenVPN on your PC and generate your secret key. &lt;/li&gt;&lt;li&gt; Configure one router as the server. &lt;/li&gt;&lt;li&gt; Configure the second router as the client. &lt;/li&gt;&lt;li&gt; Test the VPN connection. &lt;/li&gt;&lt;li&gt; Advanced Configuration: Multiple routed networks. &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;a name="Router_Preparation"&gt;&lt;/a&gt;&lt;h2&gt;&lt;span class="editsection"&gt;&lt;/span&gt; &lt;span class="mw-headline"&gt;Router Preparation &lt;/span&gt;&lt;/h2&gt; &lt;p&gt;At the time of writing, the latest available DD-WRT package is &lt;i&gt;DD-WRT &lt;/i&gt;&lt;b&gt;v24sp1&lt;/b&gt;&lt;i&gt; (10/8/08)&lt;/i&gt;. Before proceeding, you need to download the VPN-flavoured version of DD-WRT from the &lt;a href="http://www.dd-wrt.com/dd-wrtv2/downloads.php" class="external text" title="http://www.dd-wrt.com/dd-wrtv2/downloads.php" rel="nofollow"&gt;DD-WRT Download Page&lt;/a&gt;.  &lt;/p&gt;&lt;p&gt;Due to the fact that most of us have DHCP-assigned dynamic IPs, you are also recommended to create a dynamic dns host for the server router. More information on this procedure is available &lt;a href="http://linksyswrt.blogspot.com/2008/09/dynamic-dns.html"&gt;here&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;Finally, make sure that your two routers are &lt;b&gt;not&lt;/b&gt; distributing an overlapping IP subnet range. Usually, all routers come preconfigured with a 192.168.1.0 DHCP range distribution. Since you are doing &lt;b&gt;routed&lt;/b&gt; configurations, you need to change the 192.168.1.0 subnet to another one. The easiest way is to adopt a sequential assignment: &lt;/p&gt;&lt;p&gt;Server side:  192.168.1.0 Client1 side: 192.168.2.0 Client2 side: 192.168.3.0  etc... &lt;/p&gt;&lt;p&gt;This way, when your internal networks communicate with each other, they don't overlap and you don't end up having miscommunication. &lt;/p&gt;&lt;p&gt;If you are looking for a bridged configuration, you'd better check&lt;a href="http://linksyswrt.blogspot.com/2008/09/openvpn-site-to-site-bridged-vpn.html"&gt; this page instead.&lt;/a&gt; &lt;/p&gt; &lt;a name="Secret_Key_Generation"&gt;&lt;/a&gt;&lt;h2&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Secret Key Generation &lt;/span&gt;&lt;/h2&gt; &lt;p&gt;Prior to configuring your routers, you need to create a shared secret key. This key will be used to authenticate and encrypt your site to site communication. &lt;/p&gt;&lt;p&gt;Start by downloading the latest OpenVPN package from &lt;a href="http://www.openvpn.net/download.html" class="external text" title="http://www.openvpn.net/download.html" rel="nofollow"&gt;OpenVPN's main site&lt;/a&gt;. Install the package (Usually gets installed in C:\Program Files\OpenVPN if you are running Windows). Now, get a command prompt and issue the following command from the OpenVPN directory: &lt;/p&gt; &lt;pre&gt;openvpn --genkey --secret static.key&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;This will create a text file named 'static.key'. Opening it in Notepad, or any text editor will get you an output similar to the following one: &lt;/p&gt; &lt;pre&gt;#&lt;br /&gt;# 2048 bit OpenVPN static key&lt;br /&gt;#&lt;br /&gt;-----BEGIN OpenVPN Static key V1-----&lt;br /&gt;aeb68165149e096d8f04252dd22fe67d&lt;br /&gt;dd15d8c87e8a577c5c14ebd1ef0bf0b6&lt;br /&gt;0e1d652f91fe66ed3774505e641936dd&lt;br /&gt;458a6db60fb36b969d8bcd37803cf1d3&lt;br /&gt;6d49383ec2daa1d2ae70e3ca49b950a4&lt;br /&gt;bba985940e5e4a15fac702cbcf47f9d0&lt;br /&gt;39f7939980bbb63d2964bb6216471162&lt;br /&gt;0a519fe25d1e0d48044a1ad85dc94758&lt;br /&gt;af6f7b7c52ccaaefa3d013fcbf621366&lt;br /&gt;5ea18d9dc36c3b2a9ac277a9903998fe&lt;br /&gt;45e10b0f79fd443727c3f30278981b3d&lt;br /&gt;0fa525ad843645b4acc28969450bd601&lt;br /&gt;4ce774aba0e830149489dc1592741580&lt;br /&gt;fbd3cd24cc7baa68e06b3e3aedae2565&lt;br /&gt;a36b8a3f687ddbb78411740d755249cf&lt;br /&gt;45c0617c215b66eabc72f60f47b32c64&lt;br /&gt;-----END OpenVPN Static key V1-----&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;&lt;b&gt;Warning: Don't go lazy and copy the above, doing so will jeopardize your secure connection, recreate the file from scratch.&lt;/b&gt; &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;a name="Server_Configuration"&gt;&lt;/a&gt;&lt;h2&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Server Configuration &lt;/span&gt;&lt;/h2&gt; &lt;p&gt;Using Notepad or any text editor, create the following two configurations: &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;Config 1&lt;/b&gt; &lt;/p&gt; &lt;pre&gt;# Move to writable directory and create scripts&lt;br /&gt;cd /tmp&lt;br /&gt;ln -s /usr/sbin/openvpn /tmp/myvpn&lt;br /&gt;&lt;br /&gt;# Config for Site-to-Site SiteA-SiteB&lt;br /&gt;echo "&lt;br /&gt;proto udp         &lt;br /&gt;port 2000&lt;br /&gt;dev tun0&lt;br /&gt;secret /tmp/static.key&lt;br /&gt;verb 3&lt;br /&gt;comp-lzo&lt;br /&gt;keepalive 15 60&lt;br /&gt;daemon&lt;br /&gt;" &gt; SiteA-SiteB.conf&lt;br /&gt;&lt;br /&gt;# Config for Static Key&lt;br /&gt;echo "&lt;br /&gt;-----BEGIN OpenVPN Static key V1-----&lt;br /&gt;................................................&lt;br /&gt;...YOUR SECRET KEY TEXT SHOULD BE PASTED HERE...&lt;br /&gt;................................................&lt;br /&gt;-----END OpenVPN Static key V1-----&lt;br /&gt;" &gt; static.key&lt;br /&gt;&lt;br /&gt;# Create interfaces&lt;br /&gt;/tmp/myvpn --mktun --dev tun0&lt;br /&gt;ifconfig tun0 10.0.0.1 netmask 255.255.255.0 promisc up&lt;br /&gt;&lt;br /&gt;# Create routes&lt;br /&gt;route add -net OTHERSUBNET netmask 255.255.255.0 gw 10.0.0.2&lt;br /&gt;&lt;br /&gt;# Initiate the tunnel&lt;br /&gt;sleep 5&lt;br /&gt;/tmp/myvpn --config SiteA-SiteB.conf&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;&lt;b&gt;Warning:&lt;/b&gt; Watch out for the OTHERSUBNET chunk, you should replace it with your client network's subnet (for example: 192.168.2.0 or 192.168.3.0). &lt;/p&gt;&lt;p&gt;Also, do note that the static key that was created in the previous step should be pasted in the appropriate section, right after the '&lt;i&gt;echo&lt;/i&gt; text. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;Now, create a second configuration with the following text. &lt;/p&gt;&lt;p&gt;&lt;b&gt;Config 2&lt;/b&gt; &lt;/p&gt; &lt;pre&gt;# Open firewall holes&lt;br /&gt;iptables -I INPUT 2 -p udp --dport 2000 -j ACCEPT&lt;br /&gt;iptables -I FORWARD -i br0 -o tun0 -j ACCEPT&lt;br /&gt;iptables -I FORWARD -i tun0 -o br0 -j ACCEPT&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;Now, go to your Router configuration interface, click on 'Administration' then 'Commands'. Paste your 'Config 1' in your 'Startup' section and you 'Config 2' in your 'Firewall' section. &lt;/p&gt;&lt;p&gt;You're done with the server configuration! &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;a name="Client_Configuration"&gt;&lt;/a&gt;&lt;h2&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Client Configuration &lt;/span&gt;&lt;/h2&gt; &lt;p&gt;The client configuration is very similar to the server configuration, with a few small modifications. &lt;/p&gt;&lt;p&gt;Again, you need to create two configs: &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;Config 1&lt;/b&gt; &lt;/p&gt; &lt;pre&gt;# Move to writable directory and create scripts&lt;br /&gt;cd /tmp&lt;br /&gt;ln -s /usr/sbin/openvpn /tmp/myvpn&lt;br /&gt;&lt;br /&gt;# Config for Site-to-Site SiteA-SiteB&lt;br /&gt;echo "&lt;br /&gt;remote REMOTEADDRESS&lt;br /&gt;proto udp         &lt;br /&gt;port 2000&lt;br /&gt;dev tun0&lt;br /&gt;secret /tmp/static.key&lt;br /&gt;verb 3&lt;br /&gt;comp-lzo&lt;br /&gt;keepalive 15 60&lt;br /&gt;daemon&lt;br /&gt;" &gt; SiteA-SiteB.conf&lt;br /&gt;&lt;br /&gt;# Config for Static Key&lt;br /&gt;echo "&lt;br /&gt;-----BEGIN OpenVPN Static key V1-----&lt;br /&gt;................................................&lt;br /&gt;...YOUR SECRET KEY TEXT SHOULD BE PASTED HERE...&lt;br /&gt;................................................&lt;br /&gt;-----END OpenVPN Static key V1-----&lt;br /&gt;" &gt; static.key&lt;br /&gt;&lt;br /&gt;# Create interfaces&lt;br /&gt;/tmp/myvpn --mktun --dev tun0&lt;br /&gt;ifconfig tun0 10.0.0.2 netmask 255.255.255.0 promisc up&lt;br /&gt;&lt;br /&gt;# Create routes&lt;br /&gt;route add -net OTHERSUBNET netmask 255.255.255.0 gw 10.0.0.1&lt;br /&gt;&lt;br /&gt;# Initiate the tunnel&lt;br /&gt;sleep 5&lt;br /&gt;/tmp/myvpn --config SiteA-SiteB.conf&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;&lt;b&gt;Warning:&lt;/b&gt; Watch out for the OTHERSUBNET chunk, you should replace it with your server network's subnet (for example: 192.168.1.0).  &lt;/p&gt;&lt;p&gt;Also, do note that the static key that was created in the previous step should be pasted in the appropriate section, right after the 'echo text. &lt;/p&gt;&lt;p&gt;In addition to the above, and since this is your client, you need to replace the REMOTEADDRESS with your server's IP address or the dynamic DNS address you created in the previous Router Preparation section. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;Now, create a second configuration with the following text.  &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;Config 2&lt;/b&gt; &lt;/p&gt; &lt;pre&gt;# Open firewall holes&lt;br /&gt;iptables -I INPUT 2 -p udp --dport 2000 -j ACCEPT&lt;br /&gt;iptables -I FORWARD -i br0 -o tun0 -j ACCEPT&lt;br /&gt;iptables -I FORWARD -i tun0 -o br0 -j ACCEPT&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;Now, go to your Router configuration interface, click on 'Administration' then 'Commands'. Paste your 'Config 1' in your 'Startup' section and you 'Config 2' in your 'Firewall' section. &lt;/p&gt;&lt;p&gt;You're done with the client configuration! &lt;/p&gt; &lt;a name="VPN_Tests"&gt;&lt;/a&gt;&lt;h2&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt; VPN Tests &lt;/span&gt;&lt;/h2&gt; &lt;p&gt;&lt;i&gt;I am getting many emails from people asking for this section, so I'll try to add some meat. Let me know what you think about it.&lt;/i&gt; &lt;/p&gt;&lt;p&gt;Due to the fact that our routed VPN configuration is not 'natively' supported by DD-WRT, but rather an ad-hoc one. There is no direct way to get information through the router's web interface. Instead, I propose the following two alternatives/suggestions:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;a name="First_Technique:_Shell_Logging"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;First Technique: Shell Logging &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;Add logging to the VPN tunnel operation. This can be done by inserting the following line in the client and/or server configuration: &lt;/p&gt; &lt;pre&gt;log /tmp/openvpn.log&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;This will instruct openvpn to create a log file named 'openvpn.log' in /tmp. By enabling Telnet or SSH and connecting to your router, you should be able to get the logging output by issuing the following command: &lt;/p&gt; &lt;pre&gt;router$ less /tmp/openvpn.log&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;You need to use your arrow keys to scroll up and down in the log and 'q' to exit the scroller. &lt;/p&gt;&lt;p&gt;&lt;b&gt;Warning:&lt;/b&gt; This should only be used for testing and debugging purposes as it generates extra load on your router, as well as eating up valuable space in memory. &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;a name="Second_Technique:_Use_Syslog"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt; Second Technique: Use Syslog &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;Syslogging is an excellent way to get all sorts of information on your routers. In addition to OpenVPN alerts and tunnel stats, you can get router access, DHCP usage, etc... Pretty much everything using Syslogging. &lt;em&gt;Unless a 'log' stanza is present in the openvpn config file, openvpn will dump all the logging to syslog by default.&lt;/em&gt;&lt;br /&gt;&lt;b&gt;The recipe:&lt;/b&gt;&lt;br /&gt;1. Open your browser and connect to your router's interface. Click on 'Services' and scroll all the way down (I am assuming DD-WRT RC4 and above has been flashed on your router).&lt;br /&gt;2. Locate the 'System Log' section and click on 'Enable' next to &lt;b&gt;syslogd&lt;/b&gt;. This will add one more space called 'Remote Server' right underneath 'syslogd', type in your computer's IP address or preferably any other workstation that can successfully ping the router.&lt;br /&gt;&lt;/p&gt; &lt;pre&gt;   &lt;a href="http://www.dd-wrt.com/wiki/index.php/Image:Syslogview.JPG" class="image" title="Image:Syslogview.JPG"&gt;&lt;img style="width: 443px; height: 307px;" alt="Image:Syslogview.JPG" longdesc="/wiki/index.php/Image:Syslogview.JPG" src="http://www.dd-wrt.com/wiki/images/a/a8/Syslogview.JPG" /&gt;&lt;/a&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;3. Download a Syslog Daemon and viewer, there is an excellent freeware version available at Kiwi Enterprises' website that I'm linking &lt;a href="http://www.kiwisyslog.com/kiwi-syslog-daemon-overview/" class="external text" title="http://www.kiwisyslog.com/kiwi-syslog-daemon-overview/" rel="nofollow"&gt;here&lt;/a&gt;.&lt;br /&gt;4. Install the syslog daemon and &lt;b&gt;don't forget to enable it&lt;/b&gt;, this can be done in the Kiwi Sylog Application's toolbar: Click on the 'Manage' menu then successively select 'Install the Service' then 'Start the Service'. You can verify that the syslog service is operational by pressing 'Ctrl+T', this should send a test message on the console.&lt;br /&gt;5. To test it immediately, force your router to reboot and voila! You should see all messages coming from your router (including VPN initiation and communication messages) appearing on your Kiwi Syslog console page. If you are creating several VPN connections, you can configure all your routers to redirect their syslog to one PC, allowing you to easily monitor all your networks from one site! I'm currently managing 4 VPNed locations and this tool has proved to be &lt;b&gt;invaluable&lt;/b&gt; to me. &lt;/p&gt; &lt;a name="Advanced_Configuration:_Multiple_routed_networks"&gt;&lt;/a&gt;&lt;h2&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Advanced Configuration: Multiple routed networks &lt;/span&gt;&lt;/h2&gt; &lt;p&gt;&lt;b&gt;Warning:&lt;/b&gt; This section is not for the faint-hearted people. Please read carefully and email me should you have any questions/comments/thoughts. Wiki is all about teamplay!&lt;br /&gt;&lt;br /&gt;Let's assume we need to configure a 3-sites VPN connection as per the following figure:&lt;br /&gt;&lt;a href="http://www.dd-wrt.com/wiki/index.php/Image:3sites-vpn.jpg" class="image" title="Image:3sites-vpn.jpg"&gt;&lt;img alt="Image:3sites-vpn.jpg" longdesc="/wiki/index.php/Image:3sites-vpn.jpg" src="http://www.dd-wrt.com/wiki/images/9/96/3sites-vpn.jpg" width="442" height="245" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Attention:&lt;/b&gt; I tried keeping this technique simple and didn't use Certificates/CAs. Should you be interested in more complex scenarios, I do consultancy work and would gladly assist you.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You need to first start by duplicating the above Client configuration on the two 'Client1' and 'Client2' routers. Pay extra attention to the IPs and IP ranges you are using and write down your configs. In essence, both clients will have pretty much the same configuration with one minor change. Since both will be connecting to the same server, you cannot use the same &lt;b&gt;port&lt;/b&gt; number for both clients, so we will be giving port 1999 for the first client and 2000 for the second client.&lt;br /&gt;Also, we need to tell Client1 how to reach Client2's subnet and vice-versa. This means including a second routing entry in our configuration. As such, our configurations will look pretty much like the following:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;a name="Client1_Configuration"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Client1 Configuration &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;&lt;b&gt;Client1 -- Startup&lt;/b&gt; &lt;/p&gt; &lt;pre&gt;# Move to writable directory and create scripts&lt;br /&gt;cd /tmp&lt;br /&gt;ln -s /usr/sbin/openvpn /tmp/myvpn&lt;br /&gt;&lt;br /&gt;# Config for Site-to-Site Client1-Server&lt;br /&gt;echo "&lt;br /&gt;remote REMOTEADDRESS&lt;br /&gt;proto udp         &lt;br /&gt;port 2000&lt;br /&gt;dev tun0&lt;br /&gt;secret /tmp/static.key&lt;br /&gt;verb 3&lt;br /&gt;comp-lzo&lt;br /&gt;keepalive 15 60&lt;br /&gt;daemon&lt;br /&gt;" &gt; Client1-Server.conf&lt;br /&gt;&lt;br /&gt;# Config for Static Key&lt;br /&gt;echo "&lt;br /&gt;-----BEGIN OpenVPN Static key V1-----&lt;br /&gt;................................................&lt;br /&gt;...YOUR SECRET KEY TEXT SHOULD BE PASTED HERE...&lt;br /&gt;................................................&lt;br /&gt;-----END OpenVPN Static key V1-----&lt;br /&gt;" &gt; static.key&lt;br /&gt;&lt;br /&gt;# Create interfaces&lt;br /&gt;/tmp/myvpn --mktun --dev tun0&lt;br /&gt;ifconfig tun0 10.0.1.2 netmask 255.255.255.0 promisc up&lt;br /&gt;&lt;br /&gt;# Create routes&lt;br /&gt;route add -net SERVERINTERNALSUBNET netmask 255.255.255.0 gw 10.0.1.1&lt;br /&gt;route add -net CLIENT2INTERNALSUBNET netmask 255.255.255.0 gw 10.0.1.1&lt;br /&gt;&lt;br /&gt;# Initiate the tunnel&lt;br /&gt;sleep 5&lt;br /&gt;/tmp/myvpn --config Client1-Server.conf&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Client1 -- Firewall&lt;/b&gt; &lt;/p&gt; &lt;pre&gt;# Open firewall holes&lt;br /&gt;iptables -I INPUT 2 -p udp --dport 2000 -j ACCEPT&lt;br /&gt;iptables -I FORWARD -i br0 -o tun0 -j ACCEPT&lt;br /&gt;iptables -I FORWARD -i tun0 -o br0 -j ACCEPT&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a name="Client2_Configuration"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Client2 Configuration &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;&lt;b&gt;Client2 -- Startup&lt;/b&gt; &lt;/p&gt; &lt;pre&gt;# Move to writable directory and create scripts&lt;br /&gt;cd /tmp&lt;br /&gt;ln -s /usr/sbin/openvpn /tmp/myvpn&lt;br /&gt;&lt;br /&gt;# Config for Site-to-Site Client2-Server&lt;br /&gt;echo "&lt;br /&gt;remote REMOTEADDRESS&lt;br /&gt;proto udp         &lt;br /&gt;port 1999&lt;br /&gt;dev tun0&lt;br /&gt;secret /tmp/static.key&lt;br /&gt;verb 3&lt;br /&gt;comp-lzo&lt;br /&gt;keepalive 15 60&lt;br /&gt;daemon&lt;br /&gt;" &gt; Client2-Server.conf&lt;br /&gt;&lt;br /&gt;# Config for Static Key&lt;br /&gt;echo "&lt;br /&gt;-----BEGIN OpenVPN Static key V1-----&lt;br /&gt;................................................&lt;br /&gt;...YOUR SECRET KEY TEXT SHOULD BE PASTED HERE...&lt;br /&gt;................................................&lt;br /&gt;-----END OpenVPN Static key V1-----&lt;br /&gt;" &gt; static.key&lt;br /&gt;&lt;br /&gt;# Create interfaces&lt;br /&gt;/tmp/myvpn --mktun --dev tun0&lt;br /&gt;ifconfig tun0 10.0.2.2 netmask 255.255.255.0 promisc up&lt;br /&gt;&lt;br /&gt;# Create routes&lt;br /&gt;route add -net SERVERINTERNALSUBNET netmask 255.255.255.0 gw 10.0.2.1&lt;br /&gt;route add -net CLIENT1INTERNALSUBNET netmask 255.255.255.0 gw 10.0.2.1&lt;br /&gt;&lt;br /&gt;# Initiate the tunnel&lt;br /&gt;sleep 5&lt;br /&gt;/tmp/myvpn --config Client2-Server.conf&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Client2 -- Firewall&lt;/b&gt; &lt;/p&gt; &lt;pre&gt;# Open firewall holes&lt;br /&gt;iptables -I INPUT 2 -p udp --dport 1999 -j ACCEPT&lt;br /&gt;iptables -I FORWARD -i br0 -o tun0 -j ACCEPT&lt;br /&gt;iptables -I FORWARD -i tun0 -o br0 -j ACCEPT&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;a name="Server_Configuration_2"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Server Configuration &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;As for the server, we need to perform three modifications:&lt;br /&gt;1. Tell the server to listen to 2 connections, one on port 1999 and the other on port 2000. This can be done by running the openvpn daemon twice (As you will see in the coming configuration, we will be creating two TUN interface, called 'tun0' and 'tun1').&lt;br /&gt;2. Make sure to add a route to the two clients.&lt;br /&gt;3. Allow Client-to-Client connection in the Firewall configuration script.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Server -- Startup&lt;/b&gt; &lt;/p&gt; &lt;pre&gt;# Move to writable directory and create scripts&lt;br /&gt;cd /tmp&lt;br /&gt;ln -s /usr/sbin/openvpn /tmp/myvpn&lt;br /&gt;&lt;br /&gt;# Config for Site-to-Site Server-Client1&lt;br /&gt;echo "&lt;br /&gt;proto udp         &lt;br /&gt;port 2000&lt;br /&gt;dev tun0&lt;br /&gt;secret /tmp/static.key&lt;br /&gt;verb 3&lt;br /&gt;comp-lzo&lt;br /&gt;keepalive 15 60&lt;br /&gt;daemon&lt;br /&gt;" &gt; Server-Client1.conf&lt;br /&gt;&lt;br /&gt;# Config for Site-to-Site Server-Client2&lt;br /&gt;echo "&lt;br /&gt;proto udp         &lt;br /&gt;port 1999&lt;br /&gt;dev tun1&lt;br /&gt;secret /tmp/static.key&lt;br /&gt;verb 3&lt;br /&gt;comp-lzo&lt;br /&gt;keepalive 15 60&lt;br /&gt;daemon&lt;br /&gt;" &gt; Server-Client2.conf&lt;br /&gt;&lt;br /&gt;# Config for Static Key&lt;br /&gt;echo "&lt;br /&gt;-----BEGIN OpenVPN Static key V1-----&lt;br /&gt;................................................&lt;br /&gt;...YOUR SECRET KEY TEXT SHOULD BE PASTED HERE...&lt;br /&gt;................................................&lt;br /&gt;-----END OpenVPN Static key V1-----&lt;br /&gt;" &gt; static.key&lt;br /&gt;&lt;br /&gt;# Create interfaces&lt;br /&gt;/tmp/myvpn --mktun --dev tun0&lt;br /&gt;/tmp/myvpn --mktun --dev tun1&lt;br /&gt;ifconfig tun0 10.0.1.1 netmask 255.255.255.0 promisc up&lt;br /&gt;ifconfig tun1 10.0.2.1 netmask 255.255.255.0 promisc up&lt;br /&gt;&lt;br /&gt;# Create routes&lt;br /&gt;route add -net CLIENT1INTERNALSUBNET netmask 255.255.255.0 gw 10.0.1.2&lt;br /&gt;route add -net CLIENT2INTERNALSUBNET netmask 255.255.255.0 gw 10.0.2.2&lt;br /&gt;&lt;br /&gt;# Initiate the tunnel&lt;br /&gt;sleep 5&lt;br /&gt;/tmp/myvpn --config Server-Client1.conf&lt;br /&gt;/tmp/myvpn --config Server-Client2.conf&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Server -- Firewall&lt;/b&gt; &lt;/p&gt; &lt;pre&gt;# Open firewall holes for Client1&lt;br /&gt;iptables -I INPUT 2 -p udp --dport 2000 -j ACCEPT&lt;br /&gt;iptables -I FORWARD -i br0 -o tun0 -j ACCEPT&lt;br /&gt;iptables -I FORWARD -i tun0 -o br0 -j ACCEPT&lt;br /&gt;&lt;br /&gt;# Open firewall holes for Client2&lt;br /&gt;iptables -I INPUT 2 -p udp --dport 1999 -j ACCEPT&lt;br /&gt;iptables -I FORWARD -i br0 -o tun1 -j ACCEPT&lt;br /&gt;iptables -I FORWARD -i tun1 -o br0 -j ACCEPT&lt;br /&gt;&lt;br /&gt;# Allow Forwarding packets between Client1 and Client2&lt;br /&gt;iptables -I FORWARD -i tun0 -o tun1 -j ACCEPT&lt;br /&gt;iptables -I FORWARD -i tun1 -o tun0 -j ACCEPT&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;a name="Troubleshooting_.2F_FAQ"&gt;&lt;/a&gt;&lt;h2&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Troubleshooting / FAQ &lt;/span&gt;&lt;/h2&gt; &lt;p&gt;I will be including in this section any troubleshooting questions I received as well as their solution (If I have one or if the sender found a fix for it).&lt;br /&gt;&lt;/p&gt; &lt;a name="DMZ_feature_is_used_on_your_DD-WRT_router"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;DMZ feature is used on your DD-WRT router&lt;/span&gt;&lt;br /&gt;&lt;/h3&gt; &lt;p&gt;If you decide to run OpenVPN on your DD-WRT based router, make sure to disable any DMZ as the DMZ will override the usual port forwarding needed by your OpenVPN clients/server and would forward all connection requests to the DMZ host.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;a name="My_tunnel_is_up_but_I_cannot_ping_the_remote_endpoint"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;My tunnel is up but I cannot ping the remote endpoint&lt;/span&gt;&lt;br /&gt;&lt;/h3&gt; &lt;p&gt; Yes, this is normal if the router is set to be not 'pingable' (The option is set by default). To rectify this and allow your server-side and client-side hosts to ping both routers' endpoints while making sure that external hosts (Not belonging to your networks) still don't ping your routers' interfaces, add the following entry to your Firewall section in &lt;b&gt;both&lt;/b&gt; routers:  &lt;/p&gt; &lt;pre&gt;iptables -I INPUT 3 -i tun0 -p icmp -j ACCEPT&lt;br /&gt;&lt;/pre&gt;  &lt;a name="Great.21_How_about_internal_remote_administration_through_HTTP.3F"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Great! How about internal remote administration through HTTP?&lt;/span&gt;&lt;br /&gt;&lt;/h3&gt; &lt;p&gt; Well, in that case you will have to do the same operation as in the previous issue (i.e. Cannot ping the remote endpoint) and add an extra iptables command in your Firewall section in &lt;b&gt;both&lt;/b&gt; routers: &lt;/p&gt; &lt;pre&gt;iptables -I INPUT 1 -i tun0 -p tcp --dport 80 -j ACCEPT&lt;br /&gt;&lt;/pre&gt;  &lt;a name="Why_should_I_use_a_routed_configuration_and_not_a_bridged_configuration"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;Why should I use a routed configuration and not a bridged configuration &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;Interesting question. Well, a bridged configuration will 'join' both networks together as one, same subnet, same IP range... Looks easier, but the problem here would be that all kinds of packets, including the infamous broadcasts will be traveling from one side of the network to the other, resulting in less-than-optimized usage of your precious bandwidth. On the other hand, a routed network will only send directed packets from one side of the network to the other.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;a name="I_have_a_problem_connecting_my_VPNs_while_using_Chillispot.2C_what.27s_the_issue.3F"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;&lt;/span&gt;&lt;span class="mw-headline"&gt;I have a problem connecting my VPNs while using Chillispot, what's the issue?&lt;/span&gt;&lt;br /&gt;&lt;/h3&gt; &lt;p&gt;The problem here is that Chillispot insists on using 'tun0' as a communication tunnel. The easiest solution is to simply replace your 'tun0' with another tunnel ('tun2', 'tun3', etc...)&lt;br /&gt;Also, you need to make sure that &lt;b&gt;both&lt;/b&gt; your firewall and startup sections are updated accordingly.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;a name="DHCP_Forwarder_.2F_DHCP_Server_feature_of_DD-WRT"&gt;&lt;/a&gt;&lt;h3&gt;&lt;span class="editsection"&gt;[&lt;a href="http://www.dd-wrt.com/wiki/index.php?title=OpenVPN_-_Site-to-Site_routed_VPN_between_two_routers&amp;amp;action=edit&amp;amp;section=19" title="Edit section: DHCP Forwarder / DHCP Server feature of DD-WRT"&gt;edit&lt;/a&gt;]&lt;/span&gt; &lt;span class="mw-headline"&gt; DHCP Forwarder / DHCP Server feature of DD-WRT &lt;/span&gt;&lt;/h3&gt; &lt;p&gt;Please take note that this VPN configuration will not work if your router(s) is/are set up as DHCP forwarders. They must be DHCP servers in order for the VPN to connect properly.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;a name="Remarks"&gt;&lt;/a&gt;&lt;h2&gt;&lt;span class="editsection"&gt;&lt;/span&gt; &lt;span class="mw-headline"&gt;Remarks &lt;/span&gt;&lt;/h2&gt; &lt;p&gt;This should get you right in business and activate Site-to-Site routing between all Clients and the Server. I'm personally running 4 VPN connections using the above mentioned model without any issue whatsoever!&lt;br /&gt;&lt;br /&gt;Please share your thoughts, comments and experiences!&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3320444321611993428-7366486339284706565?l=linksyswrt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linksyswrt.blogspot.com/feeds/7366486339284706565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3320444321611993428&amp;postID=7366486339284706565' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3320444321611993428/posts/default/7366486339284706565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3320444321611993428/posts/default/7366486339284706565'/><link rel='alternate' type='text/html' href='http://linksyswrt.blogspot.com/2008/09/openvpn-site-to-site-routed-vpn-between.html' title='OpenVPN - Site-to-Site routed VPN between two routers'/><author><name>Atef Digital</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3320444321611993428.post-6575698046348313277</id><published>2008-09-09T03:37:00.000-07:00</published><updated>2008-09-09T03:43:19.349-07:00</updated><title type='text'>تغيير الكونكتور</title><content type='html'>&lt;a href="http://photos1.blogger.com/blogger/7283/2248/1600/pw41.jpg"&gt;&lt;img style="margin: 0px 10px 10px 0px; float: left;" alt="" src="http://photos1.blogger.com/blogger/7283/2248/320/pw41.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/7283/2248/1600/IMG_0067.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center;" alt="" src="http://photos1.blogger.com/blogger/7283/2248/320/IMG_0067.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/7283/2248/1600/IMG_0066.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center;" alt="" src="http://photos1.blogger.com/blogger/7283/2248/320/IMG_0066.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/7283/2248/1600/IMG_0058.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center;" alt="" src="http://photos1.blogger.com/blogger/7283/2248/320/IMG_0058.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/7283/2248/1600/IMG_0053.0.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center;" alt="" src="http://photos1.blogger.com/blogger/7283/2248/320/IMG_0053.0.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/7283/2248/1600/IMG_0054.0.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center;" alt="" src="http://photos1.blogger.com/blogger/7283/2248/320/IMG_0054.0.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center;" alt="" src="http://photos1.blogger.com/blogger/7283/2248/320/IMG_0056.0.jpg" border="0" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3320444321611993428-6575698046348313277?l=linksyswrt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linksyswrt.blogspot.com/feeds/6575698046348313277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3320444321611993428&amp;postID=6575698046348313277' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3320444321611993428/posts/default/6575698046348313277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3320444321611993428/posts/default/6575698046348313277'/><link rel='alternate' type='text/html' href='http://linksyswrt.blogspot.com/2008/09/blog-post_09.html' title='تغيير الكونكتور'/><author><name>Atef Digital</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3320444321611993428.post-7814611589368547505</id><published>2008-09-07T10:51:00.000-07:00</published><updated>2008-09-07T11:45:38.396-07:00</updated><title type='text'>الشيرينج على الهيوماكس بدون كمبيوتر حقيقة باستخدام لينكسيس</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.rwhitby.net/wrt54gs/final-assembly-3.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://www.rwhitby.net/wrt54gs/final-assembly-3.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.rwhitby.net/wrt54gs/pcb-top.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://www.rwhitby.net/wrt54gs/pcb-top.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.rwhitby.net/wrt54gs/pcb-bottom.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://www.rwhitby.net/wrt54gs/pcb-bottom.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.rwhitby.net/wrt54gs/final-assembly-1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://www.rwhitby.net/wrt54gs/final-assembly-1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.rwhitby.net/wrt54gs/top-connector-inside.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://www.rwhitby.net/wrt54gs/top-connector-inside.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.rwhitby.net/wrt54gs/final-assembly-2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://www.rwhitby.net/wrt54gs/final-assembly-2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.rwhitby.net/wrt54gs/linksys-dual-serial-ports.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://www.rwhitby.net/wrt54gs/linksys-dual-serial-ports.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://voidmain.is-a-geek.net/i/wrt/wrt-04.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://voidmain.is-a-geek.net/i/wrt/wrt-04.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.rwhitby.net/wrt54gs/adk233b.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://www.rwhitby.net/wrt54gs/adk233b.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.rwhitby.net/wrt54gs/JP1-IDC-Connector.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://www.rwhitby.net/wrt54gs/JP1-IDC-Connector.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.rwhitby.net/wrt54gs/front-connector-inside.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://www.rwhitby.net/wrt54gs/front-connector-inside.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;b&gt;الشيرينج على اي رسيفر بدون كمبيوتر أصبح حقيقة&lt;br /&gt;فقط بتعديل الراوتر ولكن ليس كل الأنواع فقط بعض الأنواع القليلة وتمت التجربة على linksys&lt;br /&gt;WRT54G ,WRT54GS , &lt;/b&gt;&lt;b&gt;WRT54GL&lt;/b&gt;&lt;br /&gt;&lt;b&gt; الطريقة ببساطة أضافة سيريال بروت موضحة فى الصورة&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ثم توصيله بالهيوماكس عن طريق كابل السيريال المعتاد&lt;br /&gt;واليكم طريقة تشغيل الجى بوكس على الراوتر كمثال تطبيقى&lt;br /&gt;&lt;div align="left"&gt;&lt;br /&gt;All needed steps to install gbox on linksys router (WRT54gs):&lt;br /&gt;1-install dd-wrt.v23_mini_wrt54gs&lt;br /&gt;2-restore factory settings.&lt;br /&gt;3-install dd-wrt.v23_wrt54gs FW (optional)&lt;br /&gt;4-if linksys is not present keep pinging tell it replys (linksys-IP -t)&lt;br /&gt;5-restore factory settings.&lt;br /&gt;6-configure linksys&lt;br /&gt;7-Go to Advanced TAB page and enable JFFS2 enabled.&lt;br /&gt;or&lt;br /&gt;telnet linksys root/admin&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;كود:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 130px; text-align: left;"&gt;~ # nvram set jffs_mounted=1&lt;br /&gt;~ # nvram set enable_jffs2=1&lt;br /&gt;~ # nvram set clean_jffs2=1&lt;br /&gt;~ # nvram set sys_enable_jffs2=1&lt;br /&gt;~ # nvram set sys_clean_jffs2=0&lt;br /&gt;~ # nvram commit&lt;br /&gt;~ # reboot&lt;/pre&gt; &lt;/div&gt;8-keep pinging your router till it replys&lt;br /&gt;9-Configuring gbox files&lt;br /&gt;gbox_cfg&lt;br /&gt;F: { 11 } /jffs&lt;br /&gt;F: { 12 } /tmp&lt;br /&gt;cwshare.cfg&lt;br /&gt;normal configurtion params&lt;br /&gt;10-Run your FTP server on your laptop (laptop IP is 192.168.1.100)&lt;br /&gt;11-telnet linksys root/admin&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;كود:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 162px; text-align: left;"&gt;~ # cd .. /tmp&lt;br /&gt;# cd .. / # cd jffs /jffs&lt;br /&gt;# ftpget -u hnaga -p hnaga 192.168.1.100 gboxmips gboxmips /jffs&lt;br /&gt;# ftpget -u hnaga -p hnaga 192.168.1.100 gbox_cfg gbox_cfg /jffs&lt;br /&gt;# ftpget -u hnaga -p hnaga 192.168.1.100 cwshare.cfg cwshare.cfg /jffs&lt;br /&gt;# chmod 755 gboxmips /jffs&lt;br /&gt;# nvram set rc_startup="sleep 20 &amp;amp;&amp;amp; cd /jffs &amp;amp;&amp;amp; ./gboxmips &amp;amp;" /jffs&lt;br /&gt;# nvram commit /jffs&lt;br /&gt;# reboot&lt;/pre&gt; &lt;/div&gt;12-keep pinging your router till it replys&lt;br /&gt;13-check gbox is running&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;كود:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 66px; text-align: left;"&gt;~ # ps&lt;br /&gt;..&lt;br /&gt;329 root 988 S ./gboxmips ..&lt;/pre&gt; &lt;/div&gt;14-Congratulations.&lt;/div&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3320444321611993428-7814611589368547505?l=linksyswrt.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linksyswrt.blogspot.com/feeds/7814611589368547505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3320444321611993428&amp;postID=7814611589368547505' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3320444321611993428/posts/default/7814611589368547505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3320444321611993428/posts/default/7814611589368547505'/><link rel='alternate' type='text/html' href='http://linksyswrt.blogspot.com/2008/09/blog-post.html' title='الشيرينج على الهيوماكس بدون كمبيوتر حقيقة باستخدام لينكسيس'/><author><name>Atef Digital</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
