OpenVPN on DD-WRT

So I’ve noticed that I haven’t been able to stream 1080p content from Netflix, Youtube, etc as of late. So I pulled out an older router (WRT-150N), updated DD-WRT, and setup OpenVPN. Much to my surprise it was missing a few options to make OpenVPN work with Private Internet Access.

So here is the work around, I’m not sure if this is just for my router or if it’s a problem with other routers.

Setup the OpenVPN client as much as you can by following these directions. https://www.privateinternetaccess.com/pages/client-support/#ddwrt_openvpn

Now go to your Administration -> Commands section and save this to your startup script changing the user/pass and server as needed.

echo USER >> /tmp/password.txt 
echo PASS >> /tmp/password.txt 
/usr/bin/killall openvpn 
rm /tmp/openvpncl/openvpn.conf 
touch /tmp/openvpncl/openvpn.conf 
echo client >> /tmp/openvpncl/openvpn.conf 
echo dev tun >> /tmp/openvpncl/openvpn.conf 
echo proto udp >> /tmp/openvpncl/openvpn.conf 
echo remote us-east.privateinternetaccess.com 1194 >> /tmp/openvpncl/openvpn.conf 
echo resolv-retry infinite >> /tmp/openvpncl/openvpn.conf 
echo nobind >> /tmp/openvpncl/openvpn.conf echo persist-key >> /tmp/openvpncl/openvpn.conf 
echo persist-tun >> /tmp/openvpncl/openvpn.conf 
echo ca /tmp/openvpncl/ca.crt >> /tmp/openvpncl/openvpn.conf 
echo tls-client >> /tmp/openvpncl/openvpn.conf 
echo remote-cert-tls server >> /tmp/openvpncl/openvpn.conf 
echo auth-user-pass /tmp/password.txt >> /tmp/openvpncl/openvpn.conf 
echo comp-lzo >> /tmp/openvpncl/openvpn.conf 
echo verb 1 >> /tmp/openvpncl/openvpn.conf 
echo reneg-sec 0 >> /tmp/openvpncl/openvpn.conf 
/usr/sbin/openvpn --config /tmp/openvpncl/openvpn.conf --route-up /tmp/openvpncl/route-up.sh --down-pre /tmp/openvpncl/route-down.sh --daemon

There you go your router will now connect. Sadly the GUI doesn’t show the OpenVPN status and if your connection drops or you change something you need to reboot the router to restore connectivity. A small price to pay for unmolested video streaming and privacy.