How to set-up PIA on a router running Shibby Tomato

edited October 2016 in VPN Setup Support
I'm running Shibby Tomato Firmware Version 3.1-132 on a Netgear R7000, so your mileage may vary, but the interface should look very similar if your running Shibby's version of Tomato on your router. Here's a list of supported routers.

Credit goes to both PIA user rcbarnes and the PIA support staff. I followed his guide found here and tweaked it with the PIA support staff. All changes from his guide are highlighted in yellow.
  • Login to your router (usually by entering 192.168.1.1 in your browser)
  • Default username/password are both "admin" if you are logging in for the first time
  • Click VPN from the menu on the left, then OpenVPN Client submenu
  • Choose the Client 1 tab and then Basic tab below
  • Check Start with WAN if you want to auto-connect whenever your router is online/starts up
  • Set Interface Type to TUN
  • Set Protocol to UDP
  • Set the Server Address/Port to us-east.privateinternetaccess.com (or whichever server you prefer) and port to 1198
  • There is a tiny chance that entering us-east.privateinternetaccess.com (or whichever server you prefer) might not work. You can replace that web address with the actual IP address of that server. To find the IP address, open the "terminal" application in Linux/OSX or "command prompt" in Windows and type "ping " followed by the address of the server (us-east.privateinternetaccess.com in this example). This will return an IP address that you can enter in the Server Address/Port section DON'T DO THIS, eventually the servers may change addresses and your true IP will be exposed
  • Set the Firewall to Automatic
  • Set Authorization Mode to TLS
  • Check Username/Password Authentication
  • Enter Your Username/Password in the boxes that newly appear below the check box (use your actual username starting with "p", not the proxy username that starts with "x")
  • Ensure that the Username Authen. Only box is unchecked
  • Set Extra HMAC authorization to disabled
  • Check Create NAT on tunnel
  • Click on the Advanced tab
  • Set Poll Interval to 0
  • Uncheck Redirect Internet Traffic
  • Uncheck Ignore Redirect Gateway (route-nopull)
  • Set Accept DNS configuration to Strict
  • Set Encryption cipher to AES-128-CBC
  • Set Compression to Adaptive
  • Set TLS Renegotiation Time to 0
  • Leave Connection retry as 30
  • Uncheck Verify server certificate (tls-remote)
  • In the Custom Configuration textbox, input the following:
  • persist-key
  • persist-tun
  • tls-client
  • comp-lzo
  • verb 1
  • auth SHA1
  • Click on the Keys tab
  • Paste the contents of ca.crt found in OpenVPN Config Files, into the Certificate Authority text area
  • Paste all of the characters found in that file, including "-----BEGIN CERTIFICATE-----" at the beginning and the "-----END CERTIFICATE-----" at the end
  • Press the Save button before the Start Now button

Using this setup and a guide found in the pleX forums, I was able to have PIA running while still gaining remote access to my pleX server.

Comments

  • POST Reserved for future updates
  • edited October 2016
    Thank you!

    Installed Tomato Shibby 1.28 (build 1.38) on my Asus RT-N12D1 and got OpenVPN client working with these instructions alright, but when I disconnect my computer's own PIA manager, computer is shown to use my ISP's dynamic IPs by check aka no tunneling in use despite status shows client is up and running.

    How to configure Tomato to direct all internet traffic via OpenVPN? Also, how to configure internet traffic to halt if OpenVPN client is not in use to be secure at all times? Tried to google, but no clear instructions on this topic was found - especially not for PIA.
  • Dear user1123,

    Thank you so much for this information. I was using the old setup that is not working anymore (https://www.privateinternetaccess.com/forum/discussion/110/updated-tomato-setup-for-newer-branches-including-tomatousb). I notified PIA to update the URL at the top of the page here https://www.privateinternetaccess.com/pages/client-support/tomato-vpn so it links to the current thread (currently liked to a 2012 obsolete thread)... hope they will change it soon.

    I just updated an ASUS RT-N53 (with tomato-K26USB-1.28.RT-N5x-MIPSR2-138-RT-N53.zip) and an ASUS RT-N16 (with tomato-K26USB-1.28.RT-MIPSR2-138-AIO.zip) with your instructions for VPN. Both devices are working like a charm !
  • edited October 2016
    I just tried setting up higher encryption as described here https://www.privateinternetaccess.com/forum/discussion/comment/38491/

    I am using Tomato Shibby v138 AIO firmware (http://tomato.groov.pl/?page_id=164) on a RT-N16 router. The settings remain the same as described by user1123 except for the following information:

    [Basic Tab]
    Port 1197

    [Advanced Tab]
    Encryption cipher: AES-256-CBC

    Custom configuration:
    persist-key
    persist-tun
    tls-client
    comp-lzo
    verb 3
    remote-cert-tls server
    reneg-sec 0
    auth-nocache
    auth sha256

    [Keys tab]
    Use the following info to fill in the Certificate Authority (pia-openvpn-strong-configs/ca.rsa.4096.crt):

    It seems to be working, apart from a few warnings in the log file:

    Oct 29 11:55:23 unknown daemon.warn openvpn[4530]: WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1570', remote='link-mtu 1542'
    Oct 29 11:55:23 unknown daemon.warn openvpn[4530]: WARNING: 'cipher' is used inconsistently, local='cipher AES-256-CBC', remote='cipher BF-CBC'
    Oct 29 11:55:23 unknown daemon.warn openvpn[4530]: WARNING: 'auth' is used inconsistently, local='auth SHA256', remote='auth SHA1'
    Oct 29 11:55:23 unknown daemon.warn openvpn[4530]: WARNING: 'keysize' is used inconsistently, local='keysize 256', remote='keysize 128'
    Oct 29 11:55:23 unknown daemon.notice openvpn[4530]: Data Channel Encrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
    Oct 29 11:55:23 unknown daemon.notice openvpn[4530]: Data Channel Encrypt: Using 256 bit message hash 'SHA256' for HMAC authentication
    Oct 29 11:55:23 unknown daemon.notice openvpn[4530]: Control Channel: TLSv1.2, cipher TLSv1/SSLv3 DHE-RSA-AES256-GCM-SHA384, 4096 bit RSA
    Can anyone else confirm that this is working and that the warning messages are benign ? Other information regarding these warnings: https://www.privateinternetaccess.com/forum/discussion/1724/encryption-now-its-in-your-control/p3





  • mrmann said:
    but when I disconnect my computer's own PIA manager, computer is shown to use my ISP's dynamic IPs by check aka no tunneling in use despite status shows client is up and running.
    I'm not sure if this will help, but if I remember correctly, I had to unplug the modem and the router for a few minutes. Then I plugged them back in and checked my IP (using a laptop over 2.4Ghz, a desktop over ethernet, and 2 tablets/phones over 2.4GHz and 5GHz), it was showing the correct IP for the PIA server I was connecting through.
    -------------------------------------------------------------------------------------------------------------
    mi_ca said:
    Dear user1123,

    Thank you so much for this information.
    Both devices are working like a charm !
    I'm very glad that this guide is useful to others!
    -------------------------------------------------------------------------------------------------------------
    mi_ca said:
    I just tried setting up higher encryption as described here https://www.privateinternetaccess.com/forum/discussion/comment/38491/

    Can anyone else confirm that this is working and that the warning messages are benign ?
    I'm interested in trying this and will dig a bit deeper into it later this week. Please update us if you find out any more information about the errors you were getting and if you find a solution to remove them.
  • edited November 2016
    user1123 said:
    I'm interested in trying this and will dig a bit deeper into it later this week. Please update us if you find out any more information about the errors you were getting and if you find a solution to remove them.
    Please see: https://www.privateinternetaccess.com/forum/discussion/9093/pia-openvpn-client-encryption-patch/p2, more precisely the hypotheses put forward by cqb_driver (my emphasis added):

    "Without really knowing what's going on behind the scenes I'm only speculating but I think the warnings are the result of negotiations between client and server and how OpenVPN interprets and logs certain events.

    With a standard OpenVPN GUI configuration and PIA supplied config files the cipher used is 128 bit Blowfish in CBC mode.  That is what the PIA server expects to see.  With different encryption settings specified, the warning is triggered but because of the patch the server is able to negotiate with the client the same way it would if using the PIA app. 

    This patch is really a workaround to address differences between PIA systems and the OpenVPN standard.  It all stems from the fact that PIA had implemented AES256 encryption in their client before it was available in OpenVPN. PIA did it one way, OpenVPN did it another.

    I believe the Link-MTU/Tun-MTU warning is the result of a similar situation.  For the benefit of anyone who doesn't know MTU stands for 'maximum transmission unit' and is the maximum size of an individual packet.  I think under some circumstances the value for MTU may also be negotiated between client and server and if there is a difference the result is fragmented traffic.  I don't think this necessarily causes problems or performance issues unless you have a firewall that filters fragmented packets."
  • mrmann said:
    Thank you!

    Installed Tomato Shibby 1.28 (build 1.38) on my Asus RT-N12D1 and got OpenVPN client working with these instructions alright, but when I disconnect my computer's own PIA manager, computer is shown to use my ISP's dynamic IPs by check aka no tunneling in use despite status shows client is up and running.

    How to configure Tomato to direct all internet traffic via OpenVPN? Also, how to configure internet traffic to halt if OpenVPN client is not in use to be secure at all times? Tried to google, but no clear instructions on this topic was found - especially not for PIA.

    I'm having the same issues on the asus rt-n12d1, using Tomato Firmware 1.28.0000 MIPSR2-128 K26 Max. I've tried multiple different tomato firmwares, and haven't been successful with any of them. I've also scoured the web for alternate setup guides, but no luck. If I follow the instructions from user1123, when I click "start now" in the OpenVPN settings, it will change to "stop now", but if I click off the openvpn settings and come back, it will say "start now" again, and at no point will a whatsmyip check show anything other than my ISP's. If I remove "auth SHA1" from the custom config, it will remain running, but I'm still not tunneled. I've also noticed there are at least two different versions of the ca.crt, and I've tried them both.

    mrmann, were you ever successful with this router? I'm a total noob when it comes to this stuff, and don't really understand what I'm doing, but I can follow instructions, and got PIA working fine on an ASUS RT-AC66U running Merlin. So I thought this should be easy -- but I'm pulling my hair out with this router! I still haven't found any confirmation online, that anyone has actually gotten PIA to run on the RT-N12D1 using Tomato Shibby, dd-WRT, or Merlin, so maybe it's just not possible??

  • edited February 2017
    Should the Certificate Authority keys look look like this with spaces when I paste then in? If not what am I doing wrong?


  • mi_ca said:
    [Advanced Tab]
    Encryption cipher: AES-256-CBC

    Custom configuration:
    persist-key
    persist-tun
    tls-client
    comp-lzo
    verb 3
    remote-cert-tls server
    reneg-sec 0
    auth-nocache
    auth sha256
    I have been using these settings for more than a year, and just started a few hours ago, no longer able to open the tun/tap interface. :(

    Sadly I have also tried AES-128 as well as the default settings, and the same issues, no tunnel is being setup. :(

    Logs:

    daemon.notice openvpn[10921]: VERIFY KU OK
    daemon.notice openvpn[10921]: Validating certificate extended key usage
    daemon.notice openvpn[10921]: ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
    daemon.notice openvpn[10921]: VERIFY EKU OK
    daemon.notice openvpn[10921]: VERIFY OK: depth=0, C=US, ST=CA, L=LosAngeles, O=Private Internet Access, OU=Private Internet Access, CN=c13bb370f073d3d089748dc13cc49cb3, name=c13bb370f073d3d089748dc13cc49cb3
    daemon.warn openvpn[10921]: WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1570', remote='link-mtu 1542'
    daemon.warn openvpn[10921]: WARNING: 'cipher' is used inconsistently, local='cipher AES-256-CBC', remote='cipher BF-CBC'
    daemon.warn openvpn[10921]: WARNING: 'auth' is used inconsistently, local='auth SHA256', remote='auth SHA1'
    daemon.warn openvpn[10921]: WARNING: 'keysize' is used inconsistently, local='keysize 256', remote='keysize 128'
    daemon.notice openvpn[10921]: Control Channel: TLSv1.2, cipher TLSv1/SSLv3 DHE-RSA-AES256-GCM-SHA384, 4096 bit RSA
    daemon.notice openvpn[10921]: [c13bb370f073d3d089748dc13cc49cb3] Peer Connection Initiated with [AF_INET]108.61.68.165:1197
    daemon.notice openvpn[10921]: SENT CONTROL [c13bb370f073d3d089748dc13cc49cb3]: 'PUSH_REQUEST' (status=1)
    daemon.notice openvpn[10921]: PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 209.222.18.222,dhcp-option DNS 209.222.18.218,ping 10,comp-lzo no,route 10.39.10.1,topology net30,ifconfig 10.39.10.6 10.39.10.5,cipher aes-256-cbc,auth-token'
    daemon.notice openvpn[10921]: OPTIONS IMPORT: timers and/or timeouts modified
    daemon.notice openvpn[10921]: OPTIONS IMPORT: compression parms modified
    daemon.notice openvpn[10921]: OPTIONS IMPORT: --ifconfig/up options modified
    daemon.notice openvpn[10921]: OPTIONS IMPORT: route options modified
    daemon.notice openvpn[10921]: OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
    daemon.notice openvpn[10921]: OPTIONS IMPORT: data channel crypto options modified
    daemon.err openvpn[10921]: Error: pushed cipher not allowed - aes-256-cbc not in AES-256-CBC or AES-256-GCM:AES-128-GCM
    daemon.err openvpn[10921]: OPTIONS ERROR: failed to import crypto options
    daemon.err openvpn[10921]: ERROR: Failed to apply push options
    daemon.err openvpn[10921]: Failed to open tun/tap interface
    daemon.notice openvpn[10921]: SIGUSR1[soft,process-push-msg-failed] received, process restarting
    daemon.notice openvpn[10921]: Restart pause, 5 second(s)
Sign In or Register to comment.