SmallNetBuilder Forums
Go Back   SmallNetBuilder Forums > Wireless Networking > ASUS Wireless > Asuswrt-Merlin

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-08-2013, 11:07 AM
gbguy71 gbguy71 is offline
New Member
 
Join Date: Dec 2012
Location: Northern CA
Posts: 19
Thanks: 0
Thanked 6 Times in 2 Posts
gbguy71 is just starting out
Default Setting up Merlin VPN and OpenVPN Server and Windows Client

Setting up Merlin VPN and OpenVPN 2.2.2 Server and Windows Client

[NOTE: there are unresolved issues with the Windows installation of OpenVPN 2.3.3 due to the separation of Easy-RSA from the OpenVPN install package. As of this date the issues are being worked. You may be able to find answers here https://forums.openvpn.net/server-ad...ration-f4.html

[Some additional "learning opportunities" from when I updated to a newer Merlin release and reinstalled OpenVPN]

I encountered some issues/”learning opportunities” when setting up my ASUS RT-N66U as a VPN server. I noticed that others had similar experiences, so this post may be helpful to future VPN users. I’m a noob at this, so experts feel free to correct me. I’ll edit this as needed. I’m not an Apple guy, so I’ll concentrate on Windows clients and you’ll need to go elsewhere for setting up the router as an OpenVPN client.

My approach is to reference other posts/articles, but with additional notes so that some issues can be avoided.

First, the Merlin firmware offers two VPN implementations: the basic ASUS PPTP (Point to Point Tunnel Protocol) and OpenVPN. PPTP is simple to set up but not totally secure. OpenVPN is more complex to set up, but much more secure. Look at their Wikipedia entries for more information.

First, before you do anything else, determine if your router has a public or an internal IP address. You need to have a public one for any of this work. This post on the ASUS forum tells you how using www.whatismyip.com. My ISP’s DSL modem was configured as a router. They changed it to a bridge for a one-time charge (you do NOT need to get a static IP address assigned. We’ll talk later about assigning a hostname that will handle a router’s possibly changing IP address).

Setting Up the ASUS PPTP Server

Even if you know you want to exclusively use OpenVPN you might want to go ahead and try the PPTP server just to make sure all your connections work before you jump into setting up OpenVPN. ASUS provides a good guide here. Windows has PPTP client support built into it, so once the router is set up you can get going in a heartbeat. There are a number of good articles on how to set up a VPN client on the web. This one is pretty good. If you decide you don’t want to continue using the PPTP server be sure and disable it in the router. No sense wasting router resources.

NOTE: When you look at the Windows Network and Sharing Center you’ll see the VPN connection.

Setting up the OpenVPN Server

The key article is this one about configuring a Tomato router and Windows clients (skip down to Configuring OpenVPN). You obviously don’t need to add the OpenVPN software to the router, but the setup instructions for the router and the windows client are good. Here are some additional points:
  1. The article assumes you’ll use the OpenVPN GUI that is part of the OpenVPN distribution. From what I’ve heard it isn’t the most current. Instead, install this version from SourceForge (openvpn-gui.exe). [My guess at the installation instructions:] You need to download it and copy it into the OpenVPN\bin directory once OpenVPN, including its OpenVPN GUI, has been installed. I renamed the original openvpn-gui, but kept it around.
  2. When you edit the files (e.g., vars.bat) run Notepad++ as administrator.
  3. Use this OpenVPN document (Setting up your own Certificate Authority (CA) and generating certificates and keys for an OpenVPN server and multiple clients) to guide you with setting up the keys, etc. One thing this article does is emphasize that your "common names" need to be different for each client, which caused me problems.
  4. New info for Windows:. I made these changes to the vars.bat file to resolve some issues with easy-rsa 2.2.2 (Easy-Rsa 3.x uses a different installation method that I have not used):

    1. added "path=%ProgramFiles%\OpenVPN\bin" so that openssl.exe could be found.

    2. changed the set KEY_CONFIG=openssl-1.0.0.cnf which has an illegal filename to set KEY_CONFIG=openssl.cnf
    (I first copied the openssl-1.0.0.cnf file (via renaming) to openssl.cnf)
  5. Be sure and include the -----BEGIN CERTIFICATE-----/ -----END CERTIFICATE----- , -----BEGIN PRIVATE KEY-----/ -----END PRIVATE KEY-----, and -----BEGIN DH PARAMETERS----- , -----END DH PARAMETERS----- lines of text in the router parameters.
  6. The newer Merlin releases have the VPN keys, certificates in a "VPN Details" tab. Click on "Content modification of Keys and Certificates" to access/update them.
  7. Disabled LAN > Switch Control's "NAT Acceleration" so DNS would work. (I don't recall having done that with my earlier Merlin release).
  8. The OpenVPN download is for everything, server and client. I don’t know if there is a minimal download for a strict client, one in which the keys are generated on a different machine.
  9. Don’t ask me about their recommended VPN server parameters (Push LAN to clients, etc.) I don’t know what they mean

NOTE: The VPN connection will NOT be visible in the Windows Network and Sharing Center. You’ll be able check the status from the Open GUI hidden icon.

This article covers much of the same stuff, though in less detail. Its main advantage is that it is from the OpenVPN group, so that if something changes it should be up to date.



Miscellaneous Goodies

If your router provides it, use the ASUS DDNS service to provide a hostname for your router. It will automatically be updated if your router’s IP address changes. Many of the tutorial articles suggest using DynDNS. However, in their free version your hostname registration will expire if your IP address doesn’t change for 30 days [I can’t find a concise reference for this].

How to set up your router so that it can be managed outside your local network.

If you want to be able to ping your router (good for testing) go the Firewall section and enable “Respond Ping Request from WAN”

If you are interested in a Static Key OpenVPN set up, this mini-article explains how.

General How To topics on “all things OpenVPN”.

Hope this will make things a little easier for you.

Last edited by gbguy71; 12-04-2014 at 12:36 AM. Reason: OpenVPN 2.3.2, correct URL error, new information
Reply With Quote
The Following 5 Users Say Thank You to gbguy71 For This Useful Post:
  #2  
Old 07-14-2013, 05:06 AM
rescapind rescapind is offline
New Member
 
Join Date: Jul 2013
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
rescapind is just starting out
Default Revoke client

Hi,
I'm using RT-N66U with Merlin build 3.0.0.4.372.30_3.
I have successfully set up OpenVPN server on the router.
May I know how I can revoke client cert?
Thanks a lot.
Reply With Quote
  #3  
Old 04-19-2014, 01:31 AM
wayner wayner is offline
Member
 
Join Date: Dec 2012
Location: Toronto, ON, Canada
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
wayner is just starting out
Default

I am trying to set this up and the screens on Tomato shown in the HowToGeek tutorial are somewhat different than the 37.40 Merlin pages. In particular I don't see any place in the Merlin pages where you import the Keys generated on your PC. Am I missing something? Where to you input the keys in Merlin?
Reply With Quote
  #4  
Old 04-19-2014, 02:11 AM
RMerlin's Avatar
RMerlin RMerlin is offline
Very Senior Member
 
Join Date: Apr 2012
Location: Canada
Posts: 12,168
Thanks: 66
Thanked 6,943 Times in 2,817 Posts
RMerlin is just starting out
Default

Quote:
Originally Posted by wayner View Post
I am trying to set this up and the screens on Tomato shown in the HowToGeek tutorial are somewhat different than the 37.40 Merlin pages. In particular I don't see any place in the Merlin pages where you import the Keys generated on your PC. Am I missing something? Where to you input the keys in Merlin?
There's a link that says " Content modification of Keys & Certificates." on that page - just click on it.
__________________
Asuswrt-Merlin: Customized firmware for Asus routers
Github: github.com/RMerl - Twitter: RMerlinDev
See the sticky post for more info.
Reply With Quote
Reply

Tags
openvpn, setup

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -4. The time now is 07:36 AM.


Top 10 Stats
Top Posters* Top Thanked
RMerlin  529
john9527  190
huotg01  166
System Error...  165
stevech  149
L&LD  142
jegesq  131
azazel1024  89
hggomes  88
RussellInCinc...  71
RMerlin  6942
john9527  664
stevech  375
ryzhov_al  311
L&LD  275
TeHashX  271
RogerSC  211
hggomes  174
sinshiva  156
sfx2000  145
Most Viewed Threads* Hottest Threads*
Old Asuswrt-Merli...  42969
Old SECURITY:...  18645
Old ASUS...  10886
Old ASUS...  8066
Old Asus...  4072
Old choose a new...  3441
Old Bulding...  2329
Old Horrible...  2147
Old What is dual...  1839
Old Upgraded to...  1788
Old Asuswrt-Merli...  336
Old Asus...  95
Old SECURITY:...  74
Old choose a new...  73
Old ASUS...  59
Old What is dual...  44
Old ASUS...  43
Old Can you help...  40
Old How to build...  32
Old Using a UPS...  30


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
© 2006-2015 Pudai LLC All Rights Reserved.