Page 1 of 1

How can change keep alive parameter on Openvpn protocol?

Posted: Sat Aug 09, 2014 7:47 am
by njwangchuan
Hello,everyone:

i have find a question during using Softether.When the handshake finished ,server push a order to client like this :

'PUSH_REPLY,ping 3,ping-restart 10,ifconfig 10.211.1.1 10.211.1.2,dhcp-option DNS 10.211.254.254,dhcp-option DNS 8.8.8.8,route-gateway 10.211.1.2,redirect-gateway def1'

how every,"ping 3,ping-restart 10" is really hard for my poor net condition.When i use classic openvpn server,i usually change it like this :

keepalive 10 120

it equels to "ping 10 ping-restart 120".when i use Softether,i find there is no way to change this parameter on server,even i add "keepalive 10 120" on my client config file ,it may be overrided by "ping 3,ping-restart 10" from the server push order.

how can i sovle this problem,thanks!

Re: How can change keep alive parameter on Openvpn protocol?

Posted: Thu Aug 21, 2014 6:05 am
by thisjun
There is not configuration way by GUI or CUI.
Please try to modify source code of VPN server and compile it.

Re: How can change keep alive parameter on Openvpn protocol?

Posted: Tue Oct 14, 2014 1:18 am
by njwangchuan
thisjun wrote:
> There is not configuration way by GUI or CUI.
> Please try to modify source code of VPN server and compile it.

thanks a lot!

Re: How can change keep alive parameter on Openvpn protocol?

Posted: Sat Jul 02, 2016 1:39 am
by nomad
thisjun wrote:
> There is not configuration way by GUI or CUI.
> Please try to modify source code of VPN server and compile it.

How can I do this? Is there a guide somewhere? I have no idea how to compile, is there no other way to change this setting? Thanks for your help, I've been searching for a solution for a while now...

Re: How can change keep alive parameter on Openvpn protocol?

Posted: Sat Jul 02, 2016 11:09 am
by nomad
Or is there a way to let the client (in my case openvpn app on Android) override the pushed settings? For even if I change the ping setting in the app, it is overridden by the pushed settings. In my case, the "ping 3,ping-restart 10" is using far too much battery compared to usual openvpn servers, so I need to change this setting so that I can use it on my mobile device. Thanks for your time!

Re: How can change keep alive parameter on Openvpn protocol?

Posted: Tue Jul 05, 2016 7:30 pm
by nomad
Nobody knows? Not possible?

Re: How can change keep alive parameter on Openvpn protocol?

Posted: Tue Jul 05, 2016 7:41 pm
by raafat
Even if that instruction is push from SE server, are sure that the client will follow that instruction even if you set the keepalive options on OpenVPN client configuration file ?.

Usually you can override many options that are pushed by SE server by setting those options in OpenVPN client configuration file. Kindly, double check on that and let's know what you get.


Good luck (:

Re: How can change keep alive parameter on Openvpn protocol?

Posted: Tue Jul 05, 2016 8:19 pm
by nomad
Thanks Raafat, I am trying again, this time adding the keepalive in the configuration file directly instead in the app itself.

Do you have any idea what to do in case of SSTP? There is no configuration file, neither any options in the app https://play.google.com/store/apps/deta ... pvpnclient

Re: How can change keep alive parameter on Openvpn protocol?

Posted: Wed Jul 06, 2016 2:25 pm
by nomad
I didn't notice any difference, it seems the openvn keepalive ping, ping-restart settings are always overwritten by the server :(

Re: How can change keep alive parameter on Openvpn protocol?

Posted: Thu Jul 07, 2016 6:26 pm
by raafat
Hi there!, before we investigate further in your problem, may i know why don't you just use SE Client ?

Re: How can change keep alive parameter on Openvpn protocol?

Posted: Thu Jul 07, 2016 11:43 pm
by nomad
Because there is no SE-client for Android, only for Windows

Re: How can change keep alive parameter on Openvpn protocol?

Posted: Fri Jul 22, 2016 2:12 am
by thisjun
You can refer how to compile the source code from this GitHub page.
https://github.com/SoftEtherVPN/SoftEth ... master/src

Please change about this line.
https://github.com/SoftEtherVPN/SoftEth ... VPN.h#L133

Re: How can change keep alive parameter on Openvpn protocol?

Posted: Mon Aug 08, 2016 2:52 pm
by nomad
Thanks! Even when I look at the links you provided I still don't know how to proceed after I have changed the keepalive parameters.

Re: How can change keep alive parameter on Openvpn protocol?

Posted: Wed Aug 10, 2016 5:53 pm
by nomad
thisjun wrote:
> You can refer how to compile the source code from this GitHub page.
> https://github.com/SoftEtherVPN/SoftEth ... master/src
>
> Please change about this line.
>
> https://github.com/SoftEtherVPN/SoftEth ... VPN.h#L133

Hi and thanks again, I made it, following this guide http://www.howtogeek.com/105413/how-to- ... on-ubuntu/ Am using it now, and the Openvpn battery consumption is much lower, I used ping 60 120. SSTP battery consumption seems to be unchanged, though. I changed these values https://github.com/SoftEtherVPN/SoftEth ... STP.h#L123 or are there other values I have to change as well?

Thanks!

Re: How can change keep alive parameter on Openvpn protocol?

Posted: Fri Aug 19, 2016 1:38 pm
by nomad
Somebody who knows which SSTP-parameters to change to reduce battery drain? Thanks!

Re: How can change keep alive parameter on Openvpn protocol?

Posted: Fri Sep 09, 2016 6:42 am
by thisjun
I think your changing point is right.
How much did you set the value?
Time out should be bigger than the interval time.