How can change keep alive parameter on Openvpn protocol?

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
njwangchuan
Posts: 2
Joined: Sat Aug 09, 2014 7:30 am

How can change keep alive parameter on Openvpn protocol?

Post by njwangchuan » Sat Aug 09, 2014 7:47 am

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!

thisjun
Posts: 2458
Joined: Mon Feb 24, 2014 11:03 am

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

Post by thisjun » Thu Aug 21, 2014 6:05 am

There is not configuration way by GUI or CUI.
Please try to modify source code of VPN server and compile it.

njwangchuan
Posts: 2
Joined: Sat Aug 09, 2014 7:30 am

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

Post by njwangchuan » Tue Oct 14, 2014 1:18 am

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!

nomad
Posts: 11
Joined: Sat Jul 02, 2016 1:35 am

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

Post by nomad » Sat Jul 02, 2016 1:39 am

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...

nomad
Posts: 11
Joined: Sat Jul 02, 2016 1:35 am

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

Post by nomad » Sat Jul 02, 2016 11:09 am

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!

nomad
Posts: 11
Joined: Sat Jul 02, 2016 1:35 am

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

Post by nomad » Tue Jul 05, 2016 7:30 pm

Nobody knows? Not possible?

raafat
Posts: 223
Joined: Fri Jul 03, 2015 2:21 pm

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

Post by raafat » Tue Jul 05, 2016 7:41 pm

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 (:

nomad
Posts: 11
Joined: Sat Jul 02, 2016 1:35 am

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

Post by nomad » Tue Jul 05, 2016 8:19 pm

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

nomad
Posts: 11
Joined: Sat Jul 02, 2016 1:35 am

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

Post by nomad » Wed Jul 06, 2016 2:25 pm

I didn't notice any difference, it seems the openvn keepalive ping, ping-restart settings are always overwritten by the server :(

raafat
Posts: 223
Joined: Fri Jul 03, 2015 2:21 pm

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

Post by raafat » Thu Jul 07, 2016 6:26 pm

Hi there!, before we investigate further in your problem, may i know why don't you just use SE Client ?

nomad
Posts: 11
Joined: Sat Jul 02, 2016 1:35 am

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

Post by nomad » Thu Jul 07, 2016 11:43 pm

Because there is no SE-client for Android, only for Windows

thisjun
Posts: 2458
Joined: Mon Feb 24, 2014 11:03 am

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

Post by thisjun » Fri Jul 22, 2016 2:12 am

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

nomad
Posts: 11
Joined: Sat Jul 02, 2016 1:35 am

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

Post by nomad » Mon Aug 08, 2016 2:52 pm

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.

nomad
Posts: 11
Joined: Sat Jul 02, 2016 1:35 am

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

Post by nomad » Wed Aug 10, 2016 5:53 pm

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!

nomad
Posts: 11
Joined: Sat Jul 02, 2016 1:35 am

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

Post by nomad » Fri Aug 19, 2016 1:38 pm

Somebody who knows which SSTP-parameters to change to reduce battery drain? Thanks!

thisjun
Posts: 2458
Joined: Mon Feb 24, 2014 11:03 am

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

Post by thisjun » Fri Sep 09, 2016 6:42 am

I think your changing point is right.
How much did you set the value?
Time out should be bigger than the interval time.

Post Reply