Hello,
I am trying to get a vhost config to work for ocserv, but get the error:
worker-vpn.c:1820: no networks are configured; rejecting client
Any help is appreciated.
I took a working certificate based auth configuration, and copied these
lines from the main config into the vhost block:
auth
cert-user-oid
ca-cert
server-cert (SAN for both main an vhost)
server-key
ipv4-network (CIDR)
Then, replaced the main config ipv4-network with a different valid
network that is present on an interface on the host, and switched the
main config to auth="pam".
Connections to the main server still work, but when a client attempts to
connect to the vhost:
worker-vpn.c:1820: no networks are configured; rejecting client
But, the ipv4-network block defined, in the config file, for the vhost
is being used per the following log message that precedes the reject
message above:
main: pinged 10.203.98.241 and is not in use
Looking at the source of worker-vpn, it looks like network.name being
undefined is causing the error in the rejecting client message, above:
if (WSCONFIG(ws)->network.name[0] == 0) {
oclog(ws, LOG_ERR,
"no networks are configured; rejecting client");
Per config.c, network.name appears to be an internal name for 'device',
but it does not look like you are supposed to use the device option in a
vhost:
} else if (strcmp(name, "device") == 0) {
if (!WARN_ON_VHOST(vhost->name, "device", network.name))
READ_STATIC_STRING(config->network.name);
Adding a different tun device prefix as device = "mdc" to ocserv.conf
results in this warning, confirming that we can't add a device= line to
a vhost config:
ocserv[19796]: warning: device is ignored on
managed-devices-cuesta.vpn.slo.cuesta.edu virtual host
I tried both the version of ocserv packaged for Debian Buster (0.12.2),
and for buster-backports (0.12.6).
_______________________________________________
openconnect-devel mailing list
openconnect-devel@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/openconnect-devel