Yes its needed.yes, I had the same question about reneg-sec o. Thank's for answering that Eric.
Same goes with TLS-CLIENT. is that needed?
Mar 24 22:34:39 openvpn[3574]: RESOLVE: Cannot resolve host address: <vpn_host>: Name or service not known
Mar 24 22:34:54 openvpn[3574]: RESOLVE: Cannot resolve host address: <vpn_host>: Name or service not known
Mar 24 22:35:14 openvpn[3574]: RESOLVE: Cannot resolve host address: <vpn_host>: Name or service not known
Mar 24 22:35:34 openvpn[3574]: RESOLVE: Cannot resolve host address: <vpn_host>: Name or service not known
Mar 24 22:34:19 openvpn[3574]: read TCPv4_CLIENT: Connection timed out (code=110)
Mar 24 22:34:19 openvpn[3574]: Connection reset, restarting [0]
Mar 24 22:34:19 openvpn[3574]: SIGUSR1[soft,connection-reset] received, process restarting
Mar 24 22:34:19 openvpn[3574]: Restart pause, 5 second(s)
Mar 24 22:34:24 openvpn[3574]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Mar 24 22:34:24 openvpn[3574]: Socket Buffers: R=[87380->87380] S=[16384->16384]
Has anyone had any problems with OpenVPN Client using policy rules?
I have a few rules that redirect 0.0.0.0 where the destination is x.x.x.x.
Everything seems to be working fine in the beginning and works as expected, but after a few minutes the error below keeps repeating every 20 seconds and no devices have internet anymore. If I just redirect all traffic instead of using a policy, it seems to work fine.
Code:Mar 24 22:34:39 openvpn[3574]: RESOLVE: Cannot resolve host address: <vpn_host>: Name or service not known Mar 24 22:34:54 openvpn[3574]: RESOLVE: Cannot resolve host address: <vpn_host>: Name or service not known Mar 24 22:35:14 openvpn[3574]: RESOLVE: Cannot resolve host address: <vpn_host>: Name or service not known Mar 24 22:35:34 openvpn[3574]: RESOLVE: Cannot resolve host address: <vpn_host>: Name or service not known
*Note, <vpn_host> has the actual vpn server name that you would normally enter in the configuration page, and not the text "<vpn_host>".
Right before that repeated error is this:
Code:Mar 24 22:34:19 openvpn[3574]: read TCPv4_CLIENT: Connection timed out (code=110) Mar 24 22:34:19 openvpn[3574]: Connection reset, restarting [0] Mar 24 22:34:19 openvpn[3574]: SIGUSR1[soft,connection-reset] received, process restarting Mar 24 22:34:19 openvpn[3574]: Restart pause, 5 second(s) Mar 24 22:34:24 openvpn[3574]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts Mar 24 22:34:24 openvpn[3574]: Socket Buffers: R=[87380->87380] S=[16384->16384]
Sent from my iPhone using Tapatalk
I am not sure of how you set it up but maybe this will help
This is for all traffic to go to VPN but specific IP address's go to Local ISP
Under source IP put 255.255.255.0 and Destination IP 0.0.0.0 and lface VPN
This is for Traffic that you want on Local ISP and do that for all devices you don't want going to VPN for each device put a new line with a new IP address;
Under source IP put 192.168.xxx.xxx Destination IP 0.0.0.0 and lface WAN
Or you can do it like this which would be specific IP goes to VPN and all other traffic will go to Local ISP
Under source IP put 192.168.xxx.xxx Destination IP 0.0.0.0 and lface VPN
add as many lines as you have devices that you want to use for VPN
If you want all traffic to use local ISP and selected for VPN then just do it like thisHmm okay, so I'm missing 1 rule I guess if I understand you correctly. I was under the assumption that this was done automatically. Ie, all clients will use the WAN, unless I specify in the rules that it should use the VPN.
Basically I want all traffic to use the normal WAN, but to a few specific destinations it should use a VPN (for all clients).
Does source have to be 255.255.255.0? Or does 0.0.0.0 also work?
So in other words I should change it like this?
Source: 255.255.255.0 Dest: 0.0.0.0 WAN (I don't currently have this added)
Source: 255.255.255.0 Dest: x.x.x.x VPN
Source: 255.255.255.0 Dest: x.x.x.x VPN
Source: 255.255.255.0 Dest: x.x.x.x VPN
Source: 255.255.255.0 Dest: x.x.x.x VPN
Source: 255.255.255.0 Dest: x.x.x.x VPN
If you want all traffic to use local ISP and selected for VPN then just do it like this
In the example .50 and .51 will go to VPN everything else will automatically go to Local ISP
Under source IP put 192.168.1.50 Destination IP 0.0.0.0 and lface VPN
Under source IP put 192.168.1.51 Destination IP 0.0.0.0 and lface VPN
Dont change anything on destination IP leave those at 0.0.0.0
that should work for you without any problems.
Start with WAN Yes
Interface Type TUN
Protocol TCP
Server Address and Port Address: nl-am-001.privatetunnel.com Port: 443
Firewall Automatic
Authorization Mode TLS
Username/Password Authentication No
Extra HMAC authorisation Outgoing (1)
Auth digest SHA1
Create NAT on tunnel Yes
------------------------------------------------------------
Global Log verbosity 3
Poll Interval 0
Accept DNS Configuration Exclusive
Encryption cipher BF-CBC
Compression None
TLS Renegotiation Time -1
Connection Retry -1
Verify Server Certificate No
Redirect Internet traffic Policy Rules
Block routed clients if tunnel goes down No
------------------------------------------------------------
FaceBook 0.0.0.0 66.220.158.68 VPN
------------------------------------------------------------
setenv USERNAME email@domain.com
remote-cert-tls server
sndbuf 0
rcvbuf 0
socket-flags TCP_NODELAY
auth-nocache
I think this will help you. I found it in README-merlin.txtI actually want it the other way around...
For example, so all Facebook traffic from all clients should use the VPN.
So then I've added:
Under source IP put 0.0.0.0 Destination IP 66.220.158.68 and face VPN
And for the first 5-10 minutes it seems to work fine, and on the VPN status page I can see that traffic is passed through it. But then all of a sudden everything dies as I mentioned in my initial post because it seems like it can't fine the VPN host anymore. But when I don't use policy rules it works fine....
So, I was just wondering if it was me having a wrong config, or something else.
I have it setup as such:
Code:Start with WAN Yes Interface Type TUN Protocol TCP Server Address and Port Address: nl-am-001.privatetunnel.com Port: 443 Firewall Automatic Authorization Mode TLS Username/Password Authentication No Extra HMAC authorisation Outgoing (1) Auth digest SHA1 Create NAT on tunnel Yes ------------------------------------------------------------ Global Log verbosity 3 Poll Interval 0 Accept DNS Configuration Exclusive Encryption cipher BF-CBC Compression None TLS Renegotiation Time -1 Connection Retry -1 Verify Server Certificate No Redirect Internet traffic Policy Rules Block routed clients if tunnel goes down No ------------------------------------------------------------ FaceBook 0.0.0.0 66.220.158.68 VPN ------------------------------------------------------------ setenv USERNAME email@domain.com remote-cert-tls server sndbuf 0 rcvbuf 0 socket-flags TCP_NODELAY auth-nocache
I think this will help you. I found it in README-merlin.txt
To have all your clients use the VPN tunnel when trying to
access an IP from this block that belongs to Google:
RouteGoogle 0.0.0.0 74.125.0.0/16 VPN
What method did you use to know that you where successful in routing Facebook via your VPN?Well that's pretty much what I'm doing actually, except to a few specific IP's instead of a whole range.
@RMerlin, any ideas?
Turn off the power on your router and start it up again.Well FaceBook was just an example. But it's to specific IP's, not a range.
I suppose I can't thoroughly test that the route actually works unless all other traffic is disabled.
I was just looking at the VPN statistics and saw that data was sent/received. Also in my PrivateTunnel app I can see that data was used. Ie, I downloaded a 200MB file, and 200MB showed up in the statistics & app.
So it appears that the route works. But then then something happens, and all goes to hell.
If you are testing it, just leave it running for about 15-20 minutes. The problem usually occurs by then.
Even if the route is wrong and no traffic goes over the VPN though, it shouldn't be giving this problem and going ape ###%!
Sent from my iPhone using Tapatalk
Well from the problems you where having that made me learn more about selective routing.Yeah, just wanted to check that it was just me.
I'll do a factory reset and try again.
Thanks for looking into it
Sent from my iPhone using Tapatalk
Well the problem I am encountering is that a lot of the big sites use more then 1 IP address.Yeah I use PrivateTunnel from OpenVPN, but indeed I added those extra parameters as well. Although "TCP_NODELAY" no longer does anything, tells me now in the logs that it's ignored, but it's there just in case
Also, now that it's working properly and no longer crashes out, I did indeed use the ranges instead of individual IP's, i.e. "x.x.x.0/24" etc.
Been testing it most of the morning, looks to be working 100%!
Thanks for looking into it with me!
Going back to the FaceBook example, instead of FaceBook, you could use Goolge for the tests (although I guess they have a lot more ranges to cover ) If you log into Gmail, it shows you what IP you're logged in from, or have logged on from previously. Maybe Facebook has something similar in their security settings somewhere.
But that IP that's shown should be different to the one that your ISP gives that you can also find in all of those whatsismyip websites.
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!