Netgear WNR2200 OpenVPN issue

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
n0ble
DD-WRT Novice


Joined: 07 Sep 2013
Posts: 5

PostPosted: Sat Sep 07, 2013 20:14    Post subject: Netgear WNR2200 OpenVPN issue Reply with quote
Hi All,

Hoping someone can help Smile

I'm running latest build of DD-WRT on a Netgear WRN2200.

" #!/bin/sh

USERNAME="REMOVED FOR FORUM PURPOSES"
PASSWORD="REMOVED FOR FORUM PURPOSES" # Your HMA_USER_PASSWORD not PPTP password
PROTOCOL="tcp" # udp / tcp MUST BE lower case

# Add - delete - edit servers between ##BB## and ##EE##
REMOTE_SERVERS="
##BB##
remote IP FOR FORUM PURPOSES 443
##EE##
"

#### DO NOT CHANGE below this line ####

CA_CRT='-----BEGIN CERTIFICATE-----
CERT REMOVED FOR FORUM PURPOSES
-----END CERTIFICATE-----'

CLIENT_CRT='-----BEGIN CERTIFICATE-----
CERT REMOVED FOR FORUM PURPOSES
-----END CERTIFICATE-----'

CLIENT_KEY='-----BEGIN RSA PRIVATE KEY-----
CERT REMOVED FOR FORUM PURPOSES
-----END RSA PRIVATE KEY-----'

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

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

sleep 30
mkdir /tmp/hmavpncl; cd /tmp/hmavpncl
echo -e "$USERNAME\n$PASSWORD" > userpass.conf
echo "$CA_CRT" > ca.crt; echo "$CLIENT_CRT" > client.crt; echo "$CLIENT_KEY" > client.key
echo "#!/bin/sh" > route-up.sh; echo -e "#!/bin/sh\nsleep 2" > route-down.sh
echo "#!/bin/sh
iptables -I FORWARD -i br0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o br0 -j ACCEPT
iptables -I INPUT -i tun0 -j REJECT
iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE" > /tmp/.rc_firewall
chmod 644 ca.crt client.crt; chmod 600 client.key userpass.conf; chmod 700 route-up.sh route-down.sh
chmod 700 /tmp/.rc_firewall
sleep 30
echo "client
dev tun
proto $PROTOCOL
script-security 2
hand-window 60
verb 3
mute 5
mtu-disc yes
cipher bf-cbc
auth sha1
tun-mtu 1500
resolv-retry infinite
nobind
persist-key
persist-tun
ns-cert-type server
keepalive 20 120
reneg-sec 0
log hmavpn.log
ca ca.crt
cert client.crt
key client.key
daemon
auth-user-pass userpass.conf
remote-random
$REMOTE_SERVERS" > openvpn.conf
ln -s /tmp/hmavpncl/hmavpn.log /tmp/hmavpn.log
(killall openvpn; openvpn --config /tmp/hmavpncl/openvpn.conf --route-up /tmp/hmavpncl/route-up.sh --down-pre /tmp/hmavpncl/route-down.sh) &
exit 0 "

I'm this script from HideMyAss for startup script, it all seems to start up but then I have no connectivity, until I go to "Setup - Advanced Routing and click apply settings" which is a little odd?

See attached image 1

The routing table looks no different before or after, see attached image 2

Attached image 3 is screenshot of the hmavpn.log


Any Help would be appreciated, thanks
Lee Noble
Sponsor
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum