How to Setup OpenVPN on DD-WRT using the TorGuard Startup Scripts

STEP 1) Type the router's local IP address into your web browser's URL bar and login into your router. 

By default, this is typically (if you specified a different local IP address, please use that IP address).

note: If you are running more than one router on your network, you need to change the DDWRT router

to a different address, such as to avoid IP conflict.

Enter the router's local IP address into your browser's address bar


STEP 2) After logging into the DD-WRT router web interface, please click on the 'Services' tab

DD-WRT Web interface

STEP 3) Click on the 'VPN' tab within the 'Services' tab and under OpenVPN Server/Daemon click "enable".

This is needed to enable the OpenVPN status page. Click Apply Settings...

Click on the 'VPN' tab within the Services' tab.


STEP 4) Next, access the Administration tab >> then select Commands.

Generate your DD-WRT startup script through our config generator located here

Be sure to select DD-WRT as outlined above and select the appropriate location, port, protocol and OpenVPN version and click the generate button.

STEP 5) Copy the entire contents of the generated startup script from the Config Output box and paste it into the commands window as in the image below.

Remember to replace "USERNAME-HERE" and "PASSWORD-HERE" with your TorGuard VPN service username and password.

STEP 6) Click "Save Startup" then reboot your router.

That's it! Next, we need to verify the OpenVPN connection by clicking the "status" then "OpenVPN" tab...

You can see the current status of OpenVPN under Status --> OpenVPN

In our example, we can see the connection is valid by looking under "state" - CONNECTED: SUCCESS.

If you don't see any output in the log you may need to reboot your router, on occasion, the status page won’t show your VPN status so it's always best to verify your IP over at our What's My IP page

DD-WRT Web interface

That's it! it should now be connected successfully.

There are many reasons why a DD-WRT connection may fail to connect correctly. The most common issues are down to little errors like using the wrong TG Service login username or password and server details, even having the incorrect time and date can impact on the connections.


Here is a checklist of common causes and fixes.

1. Try setting 'Use DNSMasq for DNCP', 'Use DNSMasq for DNS' and 'DHCP-Authoritative' to enabled as well as disabled.

2. Ensure the IP of the DD-WRT router is not conflicting with your main router. If your main router is currently DD-WRT has to be in the same subnet, an example of this is:

3. Ensure the DD-WRT is connected to any other router from its WAN port.

4. You could also try setting the DD-WRT router to a 'Static' connection from the 'Basic Setup' page.

5. Go to your LAN settings and manually change your IP Address, Subnet Mask and Gateway so its pointing to the DD-WRT router. You may also need to change the DNS servers if you do not want to use your ISPs DNS you can use Cloudflare DNS for example and

6. Try disabling the firewalls on your routers or modems, these can quite often cause connection issues. Once it's determined that a firewall is not causing the problem it can always be re-enabled.

7. MTU settings can quite often cause problems, you could try lowering the MTU settings by adding this command on a new line (below verb 3) on your OpenVPN configuration file: tun-mtu 1100

8. It's very important that your router has the correct time and date.


If you are running an OpenVPN Connection you can create a Log which may enable you to see the problem - so you can open a support ticket and send us the details.

1. Add the following after 'verb 3' in your OpenVPN Config startup script:

log /tmp/openvpn.log

2. Reboot your router, wait for about 5 minutes and then run the following command (Run Command) from the command text area in administration (same place as the OpenVPN config file):

ln -s /tmp/openvpn.log /tmp/www/openvpnlog.html

3. Go to the DD-WRT index page and add: /user/openvpnlog.html to it so it looks something like: http://192.168.x.x/user/openvpnlog.html

If you still have any problems please open a support ticket and we will be able to assist you.

Was this answer helpful? 722 Users Found This Useful (1452 Votes)