0

The OpenVPN manual currently only states:

This is a partial list of options which can currently be pushed: --route, --route-gateway, --route-delay, --redirect-gateway, --ip-win32, --dhcp-option, --inactive, --ping, --ping-exit, --ping-restart, --setenv, --persist-key, --persist-tun, --echo, --comp-lzo, --socket-flags, --sndbuf, --rcvbuf

But how do I get a complete list of options I can push to clients?

0

The generic way is to look through the code.

The method pull_permission_mask of init.c contains a list of valid flags (cited here for the current 2.3 release):

unsigned int flags =
      OPT_P_UP
    | OPT_P_ROUTE_EXTRAS
    | OPT_P_SOCKBUF
    | OPT_P_SOCKFLAGS
    | OPT_P_SETENV
    | OPT_P_SHAPER
    | OPT_P_TIMER
    | OPT_P_COMP
    | OPT_P_PERSIST
    | OPT_P_MESSAGES
    | OPT_P_EXPLICIT_NOTIFY
    | OPT_P_ECHO
    | OPT_P_PULL_MODE
    | OPT_P_PEER_ID;

If --route-nopull is not set on client-side, the following flags are currently accepted additionally:

flags |= (OPT_P_ROUTE | OPT_P_IPWIN32);

Now we have to match this against the options from options.c. Each option, that has one of the flags above in its VERIFY_PERMISSION can theoretically be pushed to the client. of course there could be issues as with comp-lzo.

As an example see the following snippet from options.c:

else if (streq (p[0], "topology") && p[1])
    {
      VERIFY_PERMISSION (OPT_P_UP);
      options->topology = parse_topology (p[1], msglevel);
    }

Since OPT_P_UP is in the list of flags above, "topology" may be pushed to clients.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.