Code: Select all
if dev tun AND (topology == net30 OR topology == p2p):
ifconfig 10.8.0.1 10.8.0.2
if !nopool:
ifconfig-pool 10.8.0.4 10.8.0.251
route 10.8.0.0 255.255.255.0
if client-to-client:
push "route 10.8.0.0 255.255.255.0"
else if topology == net30:
push "route 10.8.0.1"
if dev tap OR (dev tun AND topology == subnet):
ifconfig 10.8.0.1 255.255.255.0
if !nopool:
ifconfig-pool 10.8.0.2 10.8.0.253 255.255.255.0
push "route-gateway 10.8.0.1"
if route-gateway unset:
route-gateway 10.8.0.2
I then thought if it was possible to script the ccd-configs, so I enabled `push-peer-info` which should allow me to see user variables, I then added `setenv SKIP_REDIRECT_GATEWAY 1` to my client config, and did the following to my ccd-config:
Code: Select all
if !UV_SKIP_REDIRECT_GATEWAY:
push "redirect-gateway def1 bypass-dhcp"
Code: Select all
Mon Jan 22 17:59:29 2018 Options error: Unrecognized option or missing parameter(s) in /etc/openvpn/ccd/kasper:1: if (2.3.10)