mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
Several modifications to use a single UDP port in the server. This is currently done using a hack, i.e., pass the UDP socket to worker, close it on the main server and then re-open it (using REUSEADDR). Also several updates in TUN handling to allow more than one clients connecting.
87 lines
2.3 KiB
Plaintext
87 lines
2.3 KiB
Plaintext
# User authentication method. Could be set multiple times and in that case
|
|
# all should succeed.
|
|
# Options: certificate, pam.
|
|
auth = "pam"
|
|
|
|
# UTMP
|
|
use-utmp = true
|
|
|
|
# Limit the number of clients. Set to zero for unlimited.
|
|
# max-clients = 1024
|
|
max-clients = 4
|
|
|
|
# Use listen-host to limit to specific IPs or to the IPs of a provided hostname.
|
|
# listen-host = [IP|HOSTNAME]
|
|
|
|
# The time (in seconds) that a client is allowed to stay connected prior
|
|
# to authentication
|
|
auth-timeout = 40
|
|
|
|
# TCP and UDP port number
|
|
tcp-port = 3333
|
|
udp-port = 3333
|
|
|
|
# Keepalive in seconds
|
|
keepalive = 90
|
|
|
|
# The key and the certificates of the server
|
|
server-cert = /home/nmav/cvs/ocserv/test.pem
|
|
server-key = /home/nmav/cvs/ocserv/test.pem
|
|
|
|
# The Certificate Authority that will be used
|
|
# to verify clients if certificate authentication
|
|
# is set.
|
|
#ca-cert = /path/to/ca.pem
|
|
|
|
# The object identifier that will be used to read the user ID in the client certificate.
|
|
# The object identifier should be part of the certificate's DN
|
|
#cert-user-oid = 0.9.2342.19200300.100.1.1
|
|
|
|
# A revocation list of ca-cert is set
|
|
#crl = /path/to/crl.pem
|
|
|
|
# GnuTLS priority string
|
|
tls-priorities = "PERFORMANCE:%SERVER_PRECEDENCE:%COMPAT"
|
|
|
|
# The default server directory
|
|
#chroot-dir = /root
|
|
|
|
# Cookie validity time (in seconds)
|
|
# Once a client is authenticated he's provided a cookie with
|
|
# which he can reconnect. This option sets the maximum lifetime
|
|
# of that cookie.
|
|
cookie-validity = 14400
|
|
|
|
run-as-user = nobody
|
|
run-as-group = nogroup
|
|
|
|
# Network settings
|
|
|
|
device = vpns
|
|
|
|
# Script to call when a client connects and obtains an IP
|
|
# Parameters: username hostname device IP-REAL IP-LOCAL IP-REMOTE
|
|
# hostname is the hostname selected by the client
|
|
# IP-REAL is the remote IP of the client,
|
|
# IP-LOCAL is the local IP in the P-t-P connection and IP-REMOTE
|
|
# is the VPN client IP.
|
|
#connect-script = /bin/echo
|
|
#disconnect-script = /bin/echo
|
|
|
|
# The pool from which the VPN user IPs will be drawn from.
|
|
ipv4-network = 192.168.1.0
|
|
ipv4-netmask = 255.255.255.0
|
|
# Use the keywork local to advertize the local P-t-P address as DNS server
|
|
# ipv4-dns = 192.168.2.1
|
|
ipv4-dns = local
|
|
|
|
#ipv6-address =
|
|
#ipv6-mask =
|
|
#ipv6-dns =
|
|
|
|
# Leave empty to assign the default MTU of the device
|
|
# mtu =
|
|
|
|
route = 192.168.1.0/255.255.255.0
|
|
#route = 192.168.5.0/255.255.255.0
|