image

Grab 3-Year of PureVPN
For The Price of One!

PureVPN is now Zero-Log Certified by Altius IT, one of the leading independent US-based Auditors. Read More 

How Can I Configure OpenVPN on My DD-WRT Router?

Admin
Jul 08, 2014
Nov 11, 2019
35 Comments
Download PDF

For maximum control, you can always configure OpenVPN on your DD-WRT router. However, if you are not sure how to make this possible, here is what you need to do:

Things to Consider:

  • Ensure you have an active internet connection
  • You have a DD-WRT router
  • A Premium PureVPN account (if you haven’t bought it yet, click here to buy)

First you need to download all OpenVPN files. Once downloaded, extract the files.

1Open your DDWRT Control Panel and Select ‘Services’ then go to VPN tab and Enable ‘OpenVPN Client

1

2 Insert the following info:

  • Enter your desired Country / Server address in Server IP / Name box. Open *.ovpn file to get the server address. OR you can also get the complete server list here
  • In the ‘Port’ field, enter 53 for UDP and 80 for TCP.
  • Select ‘TUN’ from Tunnel Device drop down menu.
  • In Tunnel Protocol, select UDP for port number 53 or TCP for port number 80.
  • In Encryption Cipher field, select encryption level AES-256 CBC.
  • For Hash Algorithm, select SHA1.
  • Enable the Advance option.

2

3 Insert the following info:

  • For TLS Cipher select ‘None’.
  • In LZO Compression tab select ‘Adaptive’.
  • Disable NAT and also disable Firewall protection.
  • Leave the IP address and Subnet Mask field unfilled.
  • Disable the ‘Tunnel UDPMSS-Fix’ option.
  • For TLS Auth Key, go to the downloaded OpenVPN files. Open the file titled ‘WDC.key’ in notepad, copy all its content and paste it in the TLS Auth Key field.
  • In Additional Configuration, insert auth-user-pass /tmp/user.txt.
  • For CA Cert, once again open the downloaded OpenVPN files. Now, open the file titled ‘CA.crt’ in notepad, copy all its content and paste it in the CA cert field.
  • Now, save and apply the settings

Note: For some Disabling NAT gives error MANAGEMENT: Client connected from [AF_INET]127.0.0.1:16 so Enable NAT then try again

3

4 Now, click on the Security Tab at the top menu bar. Select Firewall tab and go to SPI firewall and disable the option. Once again, click on ‘Save’ and ‘Apply settings’

4

5 Now, click on the “Administration” tab and select the ‘Command’ tab. Enter the following script in command box:

#!/bin/sh
touch /tmp/user.txt
echo -e “purevpn username\npurevpn passwrord” > /tmp/user.txt

OR use alternate script

echo username >> /tmp/user.txt
echo password >> /tmp/user.txt
/usr/bin/killall openvpn
/usr/sbin/openvpn –config /tmp/openvpncl/openvpn.conf –route-up /tmp/openvpncl/route-up.sh –down-pre /tmp/openvpncl/route-down.sh –daemon

There are some changes that you need to make in text box such as:
Change PureVPN username with the actual username provided to you by PureVPN.
Change PureVPN password with the actual password provided to you by PureVPN.
At the end, click on ‘Save Startup’

5

6Now, click on ‘Management Tab’ go at the bottom and click on ‘Save’ and then ‘Apply settings’. You need to reboot your router, once router reboots, open the control panel and click on ‘Status’ and select ‘OpenVPN’. You can see your VPN status from this window.

6

 

 

Wouter — A Router with Built-In Security & Accessibility. Get It Now!

Please use the comment box for your suggestions & feedback. For additional help, please submit support ticket with errors and screen shots (if possible) or contact our 24/7 live chat.

No Yes

Comments (35 )

35 Comments

  1. Carlos Reyes says:

    Hello.

    Some months ago Ali posted a solution for configuring OpenVPN using newer versions of DD-WRT. However, the solution was not very clear. Based on that post I was able to solve the problem.

    I did the following:

    In Step 3 of the Guide where it says “In Additional Configuration, insert” I replaced “auth-user-pass /tmp/user.txt” with “auth-user-pass /tmp/openvpncl/user.txt”

    then I used this modified script:

    echo username >> /tmp/openvpncl/user.txt
    echo password >> /tmp/openvpncl/user.txt
    /usr/bin/killall openvpn
    /usr/sbin/openvpn –config /tmp/openvpncl/openvpn.conf –route-up /tmp/openvpncl/route-up.sh –down-pre /tmp/openvpncl/route-down.sh –daemon

    It worked for me. Give it a try.

  2. Dave Percy says:

    Anybody get this working? Says I have connection despite no internet access? PureVPN Support is useless and keep referring me to install instruction that I have already tried and found not to work I will not be renewing this product

    • Jason Acosta says:

      If you have a connection but are unable to access the web, you should try manually setting the DNS servers. For example, you could use google’s DNS servers (8.8.8.8 and 8.8.4.4). If that doesn’t work, you can also try enabling NAT.

  3. Dean C says:

    I see it’s been 9 months of complaints and they still have not updated this. Bad, very very bad. These instructions do not work at all.

    • PureVPN Team says:

      Hi Dean,

      We are sorry for the inconvenience. There should not be a problem with above tutorial as we have helped many users connect PureVPN using the same guide. Kindly tell us the exact problem you are facing so we may assist you accordingly OR you can join us on 24/7 live chat and ask for ‘Remote Assistance’ we will check your settings remotely and help you get connected.

      Thanks for understanding!

  4. Erick Daniel Montiel Flores says:

    This script works for me:

    #!/bin/sh
    touch /tmp/user.txt
    echo -e ‘USERNAME”n PASSWORD’ > /tmp/user.txt

    You have to respect spaces and NO spaces between username and password. and only use single quotes. Also you have to respect (n)

    Regards!

  5. PureVPN Team says:

    We really apologies for the inconvenience. We assure you that we have tested above guide and most of our users successfully connects VPN by following above tutorial.

    We request you to join us on live chat again and we will try our best to get it working for you, we are here 24/7 to assist you. And kindly also try to connect OpenVPN on your system to make sure your ISP has not blocked OpenVPN.

  6. Carlos Ramos says:

    GUIDE DONT work , connection success , dont have navegation contact live support plus email support , dont receive the help i neeed , see like 10 comment bellow say the same , purevpn what are you waiting to do a new guide a working one . is a shame

  7. stella rice says:

    trying to connect to Sydney openvpn- udp servers and all seem to connect to Adelaide servers. are there any actual working Sydney openvpn- udp servers?

    • PureVPN Team says:

      Hi Stella,

      I am sorry for the inconvenience you faced, I would request you to kindly try to connect with these server address and then let us know your au-sd1-ovpn-tcp.pointtoserver.com and au-sd1-ovpn-udp.pointtoserver.com

      We will be looking forward to your precious response!

      • stella rice says:

        au-sd1-ovpn-udp.pointtoserver.com gives me an ip 172.111.555.99 and connects to a server in Adelaide, (high latency and moderate speeds). i tested the Tcp connection and it does connect to a Sydney server however speeds are low as is sort of expected on a tcp connection, no? also i dont really need tcp.

        • PureVPN Team says:

          Stella, I am so sorry for this, Can you please join us on live chat, so we could help you solve this issue quickly.

          Thanks for being patient!

  8. giacomo says:

    running ddwrt mega on asus rtn16. No luck after following guide above. Any suggestions?

    • PureVPN Team says:

      Hi,

      I am sorry for the inconvenience. Kindly let me know error you are getting in following this guide, so I may assist you in better way.

      You can also contact us via live chat we are available 24/7 for your assistance!

  9. PureVPN Team says:

    Hi Paul,

    I am sorry for the inconvenience. All files location are at same location and they are working fine, may I know which files you are unable to download?

  10. Ali says:

    The guide is little outdated but I was able to get it working in DD-WRT. Here is my configuration and I hope it will help someone. The username/password file somehow keep getting deleted by dd-wrt. So I move the location to /tmp/openvpncl/user.txt
    I enable NAT and run the following command
    /usr/sbin/openvpn –config /tmp/openvpncl/openvpn.conf –route-up
    /tmp/openvpncl/route-up.sh –down-pre /tmp/openvpncl/route-down.sh –daemon

    Reboot router. Waiting for 30 sec after the router come back online and you should be able to see your USA or UK IP.

  11. PureVPN Team says:

    Hi Just Saying,

    I apologies for the inconvenience. We offer TCP on port 80 and UDP on port 53 so may be these ports are blocked by your ISP that’s why you are having connectivity issue.

    Let me know if I can help you further.

    • ZiRToX says:

      I confirm that a Linksys router wrt1200ac with dd-wrt firmware don’t give Internet access after setup a VPN and there are many errors. Also after I did the same test on Linux PC the VPN give an access to Internet, in conclusion it is not a ISP problem but only PureVPN setup that not working as many others users.

      • PureVPN Team says:

        We are really sorry for the inconvenience. If you are sure that OpenVPN is not blocked on your side then please join us on live chat and ask for Remote assistance, so we can diagnose the issue and help you get connected.

        Thanks for being patient, we will look forward to hear from you!

  12. PureVPN Team says:

    Hi,

    I am sorry for the inconvenience. TLS error usually comes when a protocol is blocked by your ISP. I would suggest you to try connecting with other protocols that might work.

    Let me know if you need further help!

    • Just Sayin says:

      Its not my ISP. Again I’ve used openvpn through another VPN company just fine. I was able to us TCP and UPD without issue with my ISP.

      When I switched to you guys is when I am not able to connect at all with TCP or UDP.

  13. PureVPN Team says:

    Hi,

    I am sorry for the inconvenience. I would suggest you to try with tcp and let me know it works out.

    Thanks!

  14. Raphael R says:

    Using the latest DD-WRT:Firmware: DD-WRT v3.0-r28000M kongac (10/24/15).

    Have been trying without success to setup the OpenVPN client. Still unable to connect. Getting the following error in the log:

    Clientlog:

    ca /tmp/openvpncl/ca.crt management 127.0.0.1 16 management-log-cache 100 verb 3 mute 3 syslog writepid /var/run/openvpncl.pid client resolv-retry infinite nobind persist-key persist-tun script-security 2 dev tun1 proto udp cipher aes-256-cbc auth sha1 remote usny1-ovpn-udp.purevpn.net 53 comp-lzo adaptive tun-mtu 1500 mtu-disc yes fast-io tun-ipv6 tls-auth /tmp/openvpncl/ta.key 1 auth-user-pass /tmp/user.txt

    Have disabled NAT and SPI Firewall… and am using the following servers:
    usny-ovpn-udp.pointtoserver.com
    usny1-ovpn-udp.purevpn.net

    • Just Sayin says:

      I am having the same issue. The guide is not working, and tech support so far can not resolve the issue…. i paid for a 5 year subscription and cant even use it!

  15. PureVPN Team says:

    Hi,

    I am sorry for the inconvenience, I would suggest you to share the screenshots of your router’s settings page at [email protected], so we may send you configuration guide accordingly.

    Thanks for understanding!

  16. Just Sayin says:

    i’m still not able to connect via openvpn on DD-WRT.

  17. Just Sayin says:

    I think the guide is outdated. i have Firmware: DD-WRT v3.0-r27783 std (09/08/15) and it has a User Pass Authentication field which is not addressed or even showing on the screen shot. I am not having any luck with get this up and running.

  18. PureVPN Team says:

    Hi Samuel,

    Tls error usually comes if protocols are blocked by your ISP. Kindly try with both udp and tcp and see if you get the same error. If you do then it means OpenVPN protocol is blocked by your ISP.

    Thanks and have a good day!

    • Just Sayin says:

      I have used openvpn with another vpn provider before just fine. But having the same issue with you guys… after 12 days of different errors now i am at this error. TLS error is the latest in a long series of errors since switching to you guys.

  19. Fin Bot says:

    The double quotes dont work on my dd-wrt. Try single quotes like this:

    #!/bin/sh
    touch /tmp/user.txt
    echo -e ‘usernamenpasswrord’ > /tmp/user.txt

    ******make sure you include the n between the username and password!

    After that you should see Status > OpenVPN do more stuff.

    You may also need to add a firewall rule after that. WIll post when I work out what that is.

  20. Samuel Oderinde says:

    Hi, sad that i am wasting my subscription already…..I configured this setup on Linksys WRT600Nv11
    but didnt work.