W4LNY wrote:I don't mind paying a few bucks a month for the VyprVPN service, I choose that because my current home internet is the AT&T LTE network, which is using Carrier Grade NAT and the double NAT stops several apps and devices I have from working correctly, even with port forwarding setup on my router, I have an AT&T HomeBase device with a single Ethernet port that connects to the WAN port of my router I have several devices like an XBOX, that read strict NAT when on this connection, I also use several apps that do not work on it because they require certain ports to be open and they don't work with the Carrier Grade NAT, some of these apps are on my PC, and some are on my cell phone. On my VyprVPN account I have their NAT disabled which is an option, and I have verified that all my apps work correctly when using VyprVPN on the LTE connection at least from the PC so I am confident they will all work if I can get it working on the router. I also chose their service for speed, since I am using some speed sensitive apps like games speed is important to me and they seem to be recommended for gaming.
I do know how to SSH in but don't know my way around very much if I had specific things to cut and paste into the SSH session I can manage but can't stray far from a pre-defined script, in LUCI I found all the proper settings and seem to be able to make a connection to the service at one point.
VyprVPN settings for OpenVPN:
Remote VPN Server: us3.vyprvpn.com
Port: 1194
Tunnel Device: TUN
Tunnel Protocol: UDP
LZO Compression: Yes
resolv-retry infinite
keepalive 10 60
nobind
persist-key
persist-tun
persist-remote-ip
tls-remote us3.vyprvpn.com
auth-user-pass /tmp/auth.conf
comp-lzo
verb 3
I was able to create the correct username password file using vi, I also have a CA from them which I was able to load through LUCI.
I was able to do this in the LUCI GUI with your original posts using one of the three client connections in that list I posted earlier when I tried to connect it seemed to work but could get no traffic through it, I know at this point changes have to be made to the firewall and I believe networking portions but how to do it in LUCI wasn't fully clear from the materials you posted. This is where I am stuck.
This is going to be a bit long, as I'm going to copy and paste from other sources and try to make it as streamlined as possible
Five things are needed to make a ssl vpn work: Certificates, Server Config (which doesn't apply to you), Client Config, VPN Interface creation, and Firewall rules to allow the VPN Traffic.
You already have the client config and certificate(s) provided by VyperVPN, so if you haven't already created the VPN interface, we need to do that via uci (it can just as easily be done via luci, however most of what we need to do is faster if done in uci):
Create the VPN interface:
uci set network.vpn0=interface ; uci set network.vpn0.ifname=tun0 ; uci set network.vpn0.proto=none
Allow OpenVPN tunnel utilization:
uci add firewall zone
uci set firewall.@zone[-1].name=VyperVPN
uci set firewall.@zone[-1].input=ACCEPT
uci set firewall.@zone[-1].forward=ACCEPT
uci set firewall.@zone[-1].output=ACCEPT
uci set firewall.@zone[-1].network=vpn0
uci add firewall forwarding
uci set firewall.@forwarding[-1].src='vpn'
uci set firewall.@forwarding[-1].dest='wan'
Commit the changes:
uci commit network ; /etc/init.d/network reload ; uci commit firewall ; /etc/init.d/firewall reload
Now, we need to allow forwarding from vpn -> lan, vpn -> wan, lan -> vpn, and wan -> vpn (you can copy and paste; paste in vi via right click):
Add to the top:
config rule
option target 'ACCEPT'
option proto 'tcp udp'
option family 'ipv4'
option src '*'
option dest_port '1194'
option name 'Allow Inbound VyperVPN Traffic'
config rule
option target 'ACCEPT'
option proto 'tcp udp'
option name 'Allow Forwarded VyperVPN Traffic'
option src '*'
option dest '*'
option dest_port '1194'
option src_ip '*'
(The Inbound and Forwarding rules are TCP and UDP for troubleshooting purposes on my setup; however, since you're not running your own server, you can remove TCP.)
Add to the bottom:
config forwarding
option dest 'lan'
option src 'vpn'
config forwarding
option dest 'wan'
option src 'vpn'
config forwarding
option dest 'vpn'
option src 'lan'
config forwarding
option dest 'vpn'
option src 'wan'
I'm not sure if the LAN forwarding configuration is correct to allow all traffic over the VPN, and I'd try only these two first VPN --> WAN, WAN --> VPN then add the LAN interzone forwarding if there's an issue. Since you're not using it to connect to devices on your LAN remotely, I don't think the LAN interzone forwarding is needed.
Save the changes via :wq then:
/etc/init.d/firewall restart
Please verify under "Traffic Rules" in LuCI the Inbound Rule is listed as "Accept Input" and the Forward Rule listed as "Accept forward"; if the latter is not, edit it and select "Any Zone" under Destination Zone.
By default, lan should already be forwarding to wan (wan should never be forwarded to anything other than the vpn). These zone forwarding rules will show as colored boxes under the Network - General Settings - Zones; however, for wan, Input and Forward should still be listed as drop and Output as accept. To change the zone forwarding we put in place, click edit under Zone => Forwardings and at the bottom of the Zone Settings will be Inter-Zone Forwarding.
I made a mistake in that redirect-gateway is only utilized in the server config. For most options, the server and client configs must mirror one another (if you add udp to one, udp must be added to the other, or if you adjust the mtu value, the same must be mirrored in the other, etc.); however, there are certain options that are server or client specific and are not mutually exclusive.
I don't have a thorough understanding of NAT and how it's applied, nor have I ever configured a VPN to route all traffic through it, so the worse case scenario is we may have to post on the OpenVPN forum for more experienced help. I think the above should get you up and running with all traffic being routed through the VPN, as it appears, if my assumption is correct, that you are missing the interface creation and firewall inbound and forwarding rules. Make sure the first two rules are at the top of the firewall traffic rules list, as they must be processed first if all traffic is being sent and received over the VPN.
(Last edited by JW0914 on 22 May 2015, 05:58)