Jump to content
TorGuard
  • 0
Sign in to follow this  
Brownone

Torguard easy DDRT setup on D-Link dir-615

Rate this question

Question

Brownone

Guys:

 

I ran the ddwrt setup on a D-Link dir-615.

 

Specs as follows: Router Model D-Link DIR-615-I1 

 DD-WRT v24-sp2 (06/23/14) std - build 24461

Kernel Version Linux 3.10.44 #11001 Mon Jun 23 08:07:01 CEST 2014 mips

 

The software ran setup with no issues, no errors whatsoever, it rebooted the system but when it tries to go to the following page:

http://192.168.1.1/Status_OpenVPN.asp

 

Nothing come up. What can I do to resolve this. trying to setup the Sweden UDP connection.

 

 

from startup:

 

OPVPNENABLE=`nvram get openvpncl_enable | awk '$1 == "0" {print $1}'`

if [ "$OPVPNENABLE" != 0 ]; then
nvram set openvpncl_enable=0
nvram commit
fi

sleep 10
mkdir /tmp/torguard; cd /tmp/torguard
echo -e "$USERNAME\n$PASSWORD" > userpass.conf
echo "$CA_CRT" > ca.crt
echo "#!/bin/sh
iptables -t nat -I POSTROUTING -o tun0 -j MASQUERADE" > route-up.sh
echo "#!/bin/sh
iptables -t nat -D POSTROUTING -o tun0 -j MASQUERADE" > route-down.sh
chmod 644 ca.crt; chmod 600 userpass.conf; chmod 700 route-up.sh route-down.sh
sleep 10
echo "client
auth-user-pass /tmp/torguard/userpass.conf
management 127.0.0.1 5001
management-log-cache 50
dev tun0
proto $PROTOCOL
comp-lzo adaptive
fast-io
script-security 2
mtu-disc yes
verb 4
mute 5
cipher bf-cbc
auth sha1
tun-mtu 1500
resolv-retry infinite
nobind
persist-key
persist-tun
tls-client
remote-cert-tls server
log-append torguard.log
ca ca.crt
status-version 3
status status
daemon
$REMOTE_SERVERS" > torguard.conf
ln -s /tmp/torguard/torguard.log /tmp/torguard.log
ln -s /tmp/torguard/status /tmp/status
(killall openvpn; openvpn --config /tmp/torguard/torguard.conf --route-up /tmp/torguard/route-up.sh --down /tmp/torguard/route-down.sh) &
exit

 

 

 

Firewall rules:

 

iptables -N VPN
iptables -F VPN
iptables -I INPUT -i tun0 -j VPN
iptables -I FORWARD -i tun0 -j VPN
iptables -A VPN -i tun0 -o br0 -j ACCEPT
iptables -I POSTROUTING -t nat -o tun0 -j RETURN

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
Support

Hello, if you go to administration >> commands - can you paste the full script please (REMOVE YOUR USERNAME/PASSWORD)?

 

Thanks

Share this post


Link to post
Share on other sites
  • 0
Brownone
#!/bin/sh

 

USERNAME=""

PASSWORD=""

PROTOCOL="udp"

# Add - delete - edit servers between ##BB## and ##EE##

REMOTE_SERVERS="

##BB##

# Swiss

remote-random

remote swiss.torguardvpnaccess.com 443

##EE##

"

 

#### DO NOT CHANGE below this line unless you know exactly what you're doing ####

 

CA_CRT='-----BEGIN CERTIFICATE-----

MIID5jCCA0+gAwIBAgIJAI5At1MshkY1MA0GCSqGSIb3DQEBBQUAMIGpMQswCQYD

VQQGEwJVUzELMAkGA1UECBMCQ0ExFTATBgNVBAcTDFNhbkZyYW5jaXNjbzEVMBMG

A1UEChMMRm9ydC1GdW5zdG9uMREwDwYDVQQLEwhjaGFuZ2VtZTEYMBYGA1UEAxMP

MTQxLjI1NS4xNjAuMjI2MREwDwYDVQQpEwhjaGFuZ2VtZTEfMB0GCSqGSIb3DQEJ

ARYQbWFpbEBob3N0LmRvbWFpbjAeFw0xMjExMjcwMzI0MjVaFw0yMjExMjUwMzI0

MjVaMIGpMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFTATBgNVBAcTDFNhbkZy

YW5jaXNjbzEVMBMGA1UEChMMRm9ydC1GdW5zdG9uMREwDwYDVQQLEwhjaGFuZ2Vt

ZTEYMBYGA1UEAxMPMTQxLjI1NS4xNjAuMjI2MREwDwYDVQQpEwhjaGFuZ2VtZTEf

MB0GCSqGSIb3DQEJARYQbWFpbEBob3N0LmRvbWFpbjCBnzANBgkqhkiG9w0BAQEF

AAOBjQAwgYkCgYEA3kXxmykyskwKpbqsxAmBSeAXdgVsYPqpwxxmrHY0aLIziR/D

y7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gVZI91FATXGrVdFDaQb2OjyJrFW8b4xbC8pBJxQDzqPeu9mkVpu

OhBuU+dM+9h+8Bj0tpdAernEAt8CbHIywe9Rjm0JLrYmCPKuB5ldVgG3rYQWFa3X

YWjrWtr//nGM4f4WKOFc2PHWA2gI3JwdynTNLsB9NQi0N7hhR6lmtCMeqHlm0oAz

4Ad4gQIDAQABo4IBBDCCAQAwHQYDVR0OBBYEFJvAPA1gnlD/majxi+43jL0XDfqQ

MIHQBgNVHSMEgcgwgcWAFJvAPA1gnlD/majxi+43jL0XDfqQoYGhpIGeMIGbMQsw

CQYDVQQGEwJVUzELMAkGA1UECBMCRkwxEDAOBgNVBAcTB09ybGFuZG8xETAPBgNV

BAoTCFRvckd1YXJkMQwwCgYDVQQLEwNWUE4xEzARBgNVBAMTClRHLU9WUE4tQ0Ex

ETAPBgNVBCkTCFRvckd1YXJkMSQwIgYJKoZIhvcNAQkBFhVzeXNhZG1pbkB0b3Jn

dWFyZC5uZXSCCQCkTo3m1B6NIDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUA

A4IBAQBRG46DnL/8EAPbi/eOQli5WO7lRHYyZJdlLUMlsnwkp6Ul6BMJq8q3UX3z

+pqDf3wzj94y/IpGQgE4l0fgAdwf/C7F533TSwU/vi+5PDWfwD2WmGqVmcmXn6Rp

9Fwr+oryRw8GfsVBLZHTkWF1RZrRAr8hWZhNySGFwSXlEIicvNy+9mlFhk2Nb46w

ioZKc1Lc7/okeXNWHPv6Dlm39TcNBpGX/xNoWBzqs1EtA1ZGvMcQHsKLfi3Nbaab

BYe08KWsfeZA+ih4BZ6y2E+x84NYHRebqijXTtHp35coyXllBL/+LBoZ86hKszEx

F3pjGU0+8NzvdPUbKndhzyPPnHF1

-----END CERTIFICATE-----'

 

OPVPNENABLE=`nvram get openvpncl_enable | awk '$1 == "0" {print $1}'`

 

if [ "$OPVPNENABLE" != 0 ]; then

   nvram set openvpncl_enable=0

   nvram commit

fi

 

sleep 10

mkdir /tmp/torguard; cd /tmp/torguard

echo -e "$USERNAME\n$PASSWORD" > userpass.conf

echo "$CA_CRT" > ca.crt

echo "#!/bin/sh

iptables -t nat -I POSTROUTING -o tun0 -j MASQUERADE" > route-up.sh

echo "#!/bin/sh

iptables -t nat -D POSTROUTING -o tun0 -j MASQUERADE" > route-down.sh

chmod 644 ca.crt; chmod 600 userpass.conf; chmod 700 route-up.sh route-down.sh

sleep 10

echo "client

auth-user-pass /tmp/torguard/userpass.conf

management 127.0.0.1 5001

management-log-cache 50

dev tun0

proto $PROTOCOL

comp-lzo adaptive

fast-io

script-security 2

mtu-disc yes

verb 4

mute 5

cipher bf-cbc

auth sha1

tun-mtu 1500

resolv-retry infinite

nobind

persist-key

persist-tun

tls-client

remote-cert-tls server

log-append torguard.log

ca ca.crt

status-version 3

status status

daemon

$REMOTE_SERVERS" > torguard.conf

ln -s /tmp/torguard/torguard.log /tmp/torguard.log

ln -s /tmp/torguard/status /tmp/status

(killall openvpn; openvpn --config /tmp/torguard/torguard.conf --route-up /tmp/torguard/route-up.sh --down /tmp/torguard/route-down.sh) &

exit

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...