On 08/06/17 13:49, Gert Doering wrote: > Hi, > > On Thu, Jun 08, 2017 at 01:30:12PM +0200, richard lucassen wrote: >> On Thu, 8 Jun 2017 12:00:31 +0200 >> Gert Doering <[email protected]> wrote: >> >>>> I can set ping-restart to 0 to disable this function, but settin >>>> ping to 0 just puts the ping back to the default of 10 sec. And the >>>> keepalive option is AFAIUI just a wrapper for ping and >>>> ping-restart. I cannot see how to disable the ping function. >>> >>> As long as you have *neither* keepalive nor ping in your config, it >>> should default to "0", not to "10s". Just checked the code. >> >> Yep, you're right :) >> >> But it still tries to initialize (which is quite obvious of course), >> but is there a way to tell OpenVPN to only initialize the VPN as soon as >> data enters the tunnel? > > If you do static-key, there is nothing to initialize remotely - local > init, of course, as there is no tunnel interface otherwise. > > With TLS, openvpn wants to set up the keying initally, and there is > no way today to delay that "until the first packet comes up" (at least > nothing I know of...
No, there is no such feature today. But I think this can make somewhat
sense though. It shouldn't be that hard to add a "wait for first
package on tun" on the client side, but that will not work from the
server side.
Since static key tunnels are bad by design (no PFS), it would be useful
to investigate how much efforts it would take to tweak a p2p tunnel
configuration with --tls-{client,server} to actually trigger the
connection on the first TUN/TAP packet. In these p2p tunnels the
routing on both sides are mostly predefined and don't depend on pushed
routes, so that could work.
> there might be evil ways to do that with systemd
> and socket-activation etc.)
Nope, can't even use systemd for that. Systemd can do some socket
activation based on the TCP/UDP port. In effect, this socket-activation
is basically a kind of xinetd feature with service management on top of
that.
I am not aware of any external tools which can observe what happens on a
pre-configured TUN/TAP device - including routing(!) - and can trigger
an action based on what kind of events happens.
--
kind regards,
David Sommerseth
OpenVPN Technologies, Inc
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Openvpn-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-users
