What's new

openvpn seems flakey

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Noremacyug

Regular Contributor
i'm having a small problem with the openvpn client. sometimes after rebooting the router the vpn connection isn't established and i get a resolve error in the logs. however, if i simply flip the service state switch off then back on, the vpn connects fine and i'm good to go until the next reboot. any ideas? perhaps a delay?
 
What type of WAN connection do you have? It does look like a timing issue.
 
a dsl connection. i'm assuming that's what you meant?

Yep. So I suspect the issue might be caused by the client trying to connect when the Ethernet port is up rather than after your PPPoE session gets established.

Not sure how I'll be able to reproduce such a setup here to test it (my ISP is DHCP-based), will see what I can do.
 
by default the openvpn client retries connecting every 30 seconds. for whatever reason though, it never connects, just throws errors. hopefully you have an idea. let me know if i can provide any info.

thanks
 
by default the openvpn client retries connecting every 30 seconds. for whatever reason though, it never connects, just throws errors. hopefully you have an idea. let me know if i can provide any info.

thanks


As a 'temporary' workaround set the 'VPN enabled on WAN 'option to NO on the GUI,

Then insert the following line in wan-start

service start_vpnclient1



Regards,
 
i'm having a small problem with the openvpn client. sometimes after rebooting the router the vpn connection isn't established and i get a resolve error in the logs. however, if i simply flip the service state switch off then back on, the vpn connects fine and i'm good to go until the next reboot. any ideas? perhaps a delay?

I am experiencing the same. Also using DSL PPPOE.
 
As a 'temporary' workaround set the 'VPN enabled on WAN 'option to NO on the GUI,

Then insert the following line in wan-start

service start_vpnclient1



Regards,

I would insert a "sleep 30" before starting the client, just in case wan-start would be run before the PPPoE link was actually done going up.
 
I would insert a "sleep 30" before starting the client, just in case wan-start would be run before the PPPoE link was actually done going up.


Where would that be added? In front of the other line Martineau mentioned.

Also, wouldn't my DSL modem already take care of the internet connection? What role does the router play (aside from the vpn connection) in connecting to my ISP? Am I'm mistaken?


Sent from my iPhone
 
Last edited:
Also, wouldn't my DSL modem already take care of the internet connection? What role does the router play (aside from the vpn connection) in connecting to my ISP? Am I'm mistaken?

Most DSL providers use PPPoE, which requires the router or computer connected to the modem to do some work, like authentication (that's why you may have had to put in a username and password while setting up your router while users of cable internet don't).

It's possible the router is trying to connect to the VPN before it has finished connecting to the ISP over PPPoE (meaning it has no internet connection to use for the VPN).
 
Most DSL providers use PPPoE, which requires the router or computer connected to the modem to do some work, like authentication (that's why you may have had to put in a username and password while setting up your router while users of cable internet don't).

It's possible the router is trying to connect to the VPN before it has finished connecting to the ISP over PPPoE (meaning it has no internet connection to use for the VPN).

i don't have any username/passwords regarding my isp connection on my router. which is part of my confusion. i should have mentioned too it's att uverse isp...... not sure if thats still considered dsl or not.
 
As a 'temporary' workaround set the 'VPN enabled on WAN 'option to NO on the GUI,

Then insert the following line in wan-start

service start_vpnclient1



Regards,

ok, i thought i knew how to go about doing this..... but i apparently don't. i'm gonna search the net for some answers but if anyone cares to steer me in the right direction i'd be grateful.
 
two reboots now and it looks to be connecting to the vpn just fine, even with "start with wan" set to "no". just for my future reference if i ever need to do this again.

file created at

/jffs/scripts/wan-start

wan-start contains text

#!/bin/sh

sleep 30;
service start_vpnclient1

make sure to change permissions

chmod a+rx /jffs/scripts/*


now if i can just get a couple more issues ironed out it'll be perfect.
 
two reboots now and it looks to be connecting to the vpn just fine, even with "start with wan" set to "no". just for my future reference if i ever need to do this again.

file created at

/jffs/scripts/wan-start

wan-start contains text



make sure to change permissions




now if i can just get a couple more issues ironed out it'll be perfect.

Glad you got it working.

Scripting can truly exploit the capabilities of the router.

To aid debugging of scripts I personally favour using logger statements so you can check back in syslog what your scripts are doing ;)

Code:
#!/bin/sh

logger -t "($(basename $0))" $$ VPN Client processing starting.... " $0${*:+ $*}."

sleep 30

service start_vpnclient1

logger -t "($(basename $0))" $$ VPN Client processing complete.... " $0${*:+ $*}."

Regards,
 
Glad you got it working.

Scripting can truly exploit the capabilities of the router.

To aid debugging of scripts I personally favour using logger statements so you can check back in syslog what your scripts are doing ;)

Code:
#!/bin/sh

logger -t "($(basename $0))" $$ VPN Client processing starting.... " $0${*:+ $*}."

sleep 30

service start_vpnclient1

logger -t "($(basename $0))" $$ VPN Client processing complete.... " $0${*:+ $*}."

Regards,

very cool. thanks

one quick question whilst i have you here. is there a simple method in which i can have a single port bypass the vpn and connect to a client on the network. what i'm wanting to do is connect to transmissions webui for access when not at home. going through the vpn is a pain to try an accomplish. i've tried posting/searching for this before, but don't recall getting a definitive response.
 
Last edited:

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top