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

Last updated: October 5, 2025
Table of Contents

DD-WRT OpenVPN Setup

This guide shows you how to configure OpenVPN on DD-WRT routers using TorGuard's automated startup script generator. This protects all devices on your network with VPN encryption.

Prerequisites

Before You Begin:

  • DD-WRT compatible router with recent firmware (build 25000 or higher recommended)
  • Sufficient flash memory (8MB+ recommended for OpenVPN)
  • TorGuard VPN account with active subscription
  • VPN credentials (different from website login)
  • Router admin access (username and password)

Important: Make sure your DD-WRT build supports OpenVPN. Check the DD-WRT database for your router model.

Step 1: Access DD-WRT Web Interface

Login to Router

  1. Open your web browser
  2. Enter your router's IP address (typically 192.168.1.1)
  3. Login with your router admin credentials

Tip: If running multiple routers, change DD-WRT to a different IP (e.g., 192.168.2.1) to avoid conflicts.

DD-WRT Login
Accessing DD-WRT via web browser

Step 2: Navigate to Services Tab

Access VPN Settings

After logging in, click on the Services tab in the main navigation menu.

DD-WRT Services Tab
DD-WRT web interface showing Services tab

Step 3: Enable OpenVPN

Activate OpenVPN Service

  1. Click the VPN tab within Services
  2. Under OpenVPN Server/Daemon, click Enable
  3. Click Apply Settings

This enables the OpenVPN status page for monitoring your connection.

Enable OpenVPN
Enabling OpenVPN in DD-WRT

Step 4: Generate Startup Script

Create Configuration

  1. Go to Administration tab → Commands
  2. Visit TorGuard's Config Generator
  3. Configure the following options:
    • Type: DD-WRT
    • Server: Choose your preferred location
    • Port: 443 (recommended) or 1194
    • Protocol: TCP (more reliable) or UDP (faster)
    • OpenVPN Version: 2.4 or higher
  4. Click Generate Config
Config Generator
TorGuard Config Generator for DD-WRT

Step 5: Apply Startup Script

Install Configuration

  1. Copy the entire generated script from the Config Output box
  2. Paste it into the Commands window in DD-WRT
  3. Replace USERNAME-HERE with your VPN username
  4. Replace PASSWORD-HERE with your VPN password

Security Note: Use VPN credentials, not website login details!

Paste Script
Pasting startup script with credentials

Step 6: Save and Reboot

Finalize Setup

  1. Click Save Startup
  2. Reboot your router (Administration → Management → Reboot Router)
  3. Wait 2-3 minutes for router to fully restart

Step 7: Verify Connection

Check VPN Status

  1. Go to StatusOpenVPN
  2. Look for "CONNECTED: SUCCESS" under State
  3. Verify your public IP at TorGuard IP Check

If status page is empty, reboot router again and wait a few minutes.

OpenVPN Status
Successful OpenVPN connection status

Troubleshooting Guide

Common Issues and Solutions

1. DNS Configuration

Try toggling these settings under Setup → Basic Setup:

  • Use DNSMasq for DHCP
  • Use DNSMasq for DNS
  • DHCP-Authoritative

2. IP Conflicts

  • Ensure DD-WRT IP doesn't conflict with main router
  • Example: Main router: 192.168.1.1, DD-WRT: 192.168.1.51
  • Both must be in same subnet

3. Connection Method

  • Connect DD-WRT to main router via WAN port
  • Try setting DD-WRT to Static connection in Basic Setup

4. Client Configuration

  • Manually set client IP to point to DD-WRT router
  • Use Cloudflare DNS: 1.1.1.1 and 1.0.0.1

5. Firewall Issues

  • Temporarily disable firewalls for testing
  • Re-enable after confirming connection works

6. MTU Settings

Add this to your startup script after verb 3:

tun-mtu 1100

7. Time and Date

  • Ensure router has correct time/date
  • Enable NTP client in Administration → Management

Enable OpenVPN Logging

Debug Connection Issues

1. Enable Logging

Add this line after verb 3 in your startup script:

log /tmp/openvpn.log

2. Create Log Link

After rebooting, run this command in Administration → Commands:

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

3. View Logs

Access logs at: http://192.168.x.x/user/openvpnlog.html

Include these logs when contacting support for faster resolution.

Performance Optimization

Maximize VPN Speed

  • Use UDP protocol for better performance
  • Select nearby servers to reduce latency
  • Enable hardware acceleration if supported
  • Adjust MTU for your network (typically 1400-1500)
  • Disable unnecessary services on router

Additional Resources

Helpful Links

Was this article helpful?

Share:

Ready to Get Help?

Our support team is available 24/7 to assist you with any questions.