Commit Graph

228 Commits

Author SHA1 Message Date
Nikos Mavrogiannopoulos
fb07fcca87 vpn.h: made sign of max_ban_score more appropriate
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2020-03-12 19:47:50 +01:00
Alan Jowett
780fbb89a0 Script needs access to additional client metadata.
Export more information to the script, including client device platform,
type and user agent.

Resolves: #256

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2020-03-11 09:13:55 +01:00
Alan Jowett
b43e782b12 Add support for RFC6750 bearer tokens to ocserv
This permits the validation of OpenID Connect auth tokens OpenID
Connect is an OAuth 2.0 protocol used to identify a resource owner
(VPN client end-user) to a resource server (VPN server) intermediated
by an Authorization server.

Resolves: #240

Signed-off-by: Alan TG Jowett <alan.jowett@microsoft.com>
2020-03-09 21:48:04 +01:00
Lele Long
17ed47488d Add udp-listen-host option for DTLS
This option supports different listen addresses for tcp and
udp such as haproxy for tcp, but support dtls at the same time (haproxy
does not support UDP at the moment)
2019-09-30 09:01:55 +08:00
Nikos Mavrogiannopoulos
579d99ee39 ocserv: added the --no-chdir command line option
This allows running on the background but without changing the
current directory.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-05-10 20:03:50 +02:00
Nikos Mavrogiannopoulos
b1e3ff580f config: added options to change compression algorithm priorities
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-15 17:25:27 +02:00
Nikos Mavrogiannopoulos
cf8304cadf sec-mod/main: eliminate mem leaks related to vhost transition
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-14 18:34:12 +02:00
Nikos Mavrogiannopoulos
56a2d4b7e4 use casts to avoid various clang warnings under BSD systems
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-10 17:56:12 +01:00
Nikos Mavrogiannopoulos
ba6921ed9a Introduced the notion of virtual hosts
This provides virtualized server configurations which take
effect after client connection when client hello is received.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-06 20:42:31 +01:00
Nikos Mavrogiannopoulos
1b8079a11a Replaced the configuration parser with inih parser
That eliminates the dependency on libopts as well as autogen.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-01-23 21:07:18 +01:00
Nikos Mavrogiannopoulos
f6f2351fef vpn.h: increased AUTH_SLACK_TIME to 15 secs and documented its use
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2017-12-17 17:44:40 +01:00
Nikos Mavrogiannopoulos
99b2fdcd06 Reset periodically the server statistics kept
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2017-04-14 16:39:00 +03:00
Nikos Mavrogiannopoulos
3c8cdaedb1 Send "config client" XML field after successful auth
This allows to advertise the XML configuration file for the
client to download, in recent openconnect clients. In addition
made support for the client XML file unconditional (no longer
depending on the anyconnect client compatibility flag).
2017-01-04 16:20:29 +01:00
Andrew Patrikalakis
69261b6aa8 Automatically switch to TCP in case of no received UDP traffic
and enable by default
2016-11-01 19:53:33 -07:00
Nikos Mavrogiannopoulos
5fce6c8c86 Use the X-AnyConnect-Identifier-Platform header to identify mobile clients
That is, if the header contains "android" or "apple-ios" mark it as
a mobile client. The header X-AnyConnect-Identifier-DeviceType is only
considered for logging purposes and appended to the user-agent name
if present.
2016-09-25 15:44:43 +02:00
Nikos Mavrogiannopoulos
445b9070a6 untied the cisco-client-compat option from the DTLS-LEGACY protocol
Introduced instead the 'dtls-legacy' config option which can be used
to explicitly disable the legacy DTLS protocol.
2016-09-22 15:43:50 +02:00
Nikos Mavrogiannopoulos
4c85fa97f0 Added configuration option 'dtls-psk'
When this option is set to false, the DTLS-PSK protocol
will not be negotiated by worker processes. The process will fallback
to the legacy protocol in that case.
2016-09-22 15:20:35 +02:00
Nikos Mavrogiannopoulos
646449743c added defs.h containing definitions from vpn.h
These are the definitions used by common/ library and
a split from vpn.h to reduce the dependencies (in headers)
to common library.
2016-09-14 11:18:35 +02:00
Nikos Mavrogiannopoulos
58b447c413 Use a macro for the DTLS-PSK protocol indicator
Also corrected its usage in worker-http
2016-09-13 14:09:59 +02:00
Nikos Mavrogiannopoulos
555d2cb03e Added the match-tls-and-dtls-ciphers config option
That when enable, it will prevent any DTLS negotiation other than the
DTLS-PSK, and will ensure that the cipher/mac combination matches on
the TLS and DTLS connections. The cisco-client-compat config option
when disabled, it will disable the pre-draft-DTLS negotiation.
2016-09-13 13:25:35 +02:00
Nikos Mavrogiannopoulos
5c9cda67fb ocserv: added a host-update-script config option
This option will set a script to be called once the user is
connected and provides a hostname to be used with his IP. That
script can be used to update a DNS server or so.

Relates #39
2016-06-04 19:49:03 +02:00
Nikos Mavrogiannopoulos
7f65577fbd ocserv: enforce a default auth timeout value
That is to prevent processes hanging on inactive sessions.
2016-05-16 14:47:15 +02:00
Nikos Mavrogiannopoulos
8892eb1934 use a single format for all messages simplifying server
That patch also combines all the message generation or receiving
functions for to allow easier modifications to the format.
2016-03-06 19:07:07 +01:00
Nikos Mavrogiannopoulos
f3338e84f7 Added occtl command to display cookies
This allows to display and examine valid cookies from occtl.
2016-03-06 12:05:36 +01:00
Nikos Mavrogiannopoulos
63d3b98cad use more consistent naming in internal messages 2016-03-05 14:00:50 +01:00
Nikos Mavrogiannopoulos
76e602a4ca worker: don't log the SID in normal debugging levels 2016-03-05 11:20:54 +01:00
Nikos Mavrogiannopoulos
fccaca16bd Increased the SID (cookie) size to 256-bits 2016-02-23 15:31:17 +01:00
Nikos Mavrogiannopoulos
010257c6a2 Simplified cookie handling
This change set eliminates the need for cryptographically authenticated
cookies and relies on sec-module providing accurate information on
the SID provided by the client.
2016-02-23 15:31:17 +01:00
Nikos Mavrogiannopoulos
029e42d07d moved human_addr2() to ip-util.c 2016-02-19 09:56:21 +01:00
Nikos Mavrogiannopoulos
7b086fb3f9 Don't print any cookie data unless debug level is set to be over 8
That prevents adding into debugging logs sensitive data which can be used
to resume sessions.
2015-12-18 11:22:49 +01:00
Nikos Mavrogiannopoulos
01706859e0 occtl: print the restricted ports for the client 2015-12-08 14:14:27 +01:00
Nikos Mavrogiannopoulos
9252e22298 Added reference counting to configuration values.
That is, to allow referencing to these values from proc_st
without fearing of them being invalidated on a config reload. We
perform a cleanup of these values on the server periodic check.
2015-12-05 11:08:51 +01:00
Nikos Mavrogiannopoulos
eabfbe8473 Added configuration option 'restrict-user-to-ports'
This option is intended to allow restricting users to accessing
specific ports once they enter the VPN. The rules set using this
option will be enforced by the ocserv-fw script.
2015-12-02 10:38:12 +01:00
Nikos Mavrogiannopoulos
0a38b70cc3 removed unused structure 2015-12-01 13:51:30 +01:00
Nikos Mavrogiannopoulos
2d823aa200 Added config option 'append-routes'
If set to true it will restore the old configuration semantics
of appending the global routes to per user/group config.
2015-11-28 19:28:24 +01:00
Nikos Mavrogiannopoulos
f5fca982dc Added configuration option restrict-user-to-routes
This option, if set, will call /usr/bin/ocserv-fw for each user
connecting, i.e., adding firewall restrictions based on its allowed
routes.
2015-11-23 17:31:55 +01:00
Nikos Mavrogiannopoulos
2473633b8d Added cookie key rotation 2015-11-17 08:33:38 +01:00
Nikos Mavrogiannopoulos
65004a55df Added configuration option tunnel-all-dns 2015-11-10 13:50:03 +01:00
Nikos Mavrogiannopoulos
0b8f4beb8b Added user-specific configuration options dpd, mobile-dpd, keepalive, max-same-clients 2015-11-10 13:49:13 +01:00
Nikos Mavrogiannopoulos
7a4fc3b0aa moved ip-related macros to ip-util 2015-10-30 14:03:24 +01:00
Nikos Mavrogiannopoulos
5a10283125 Added the config option expose-iroutes
This allows the server to advertise routes offered by few clients
to all clients except the ones offering them.
2015-10-25 22:43:54 +01:00
Nikos Mavrogiannopoulos
40bd1550c1 ipv6: introduced ipv6-subnet-prefix config option
That option allows to specify the IPv6 subnet prefix to be given
to client. That is, allow providing the clients networks larger
than /128. Set the option to 128 to simulate the previous behavior
of ocserv.
2015-10-24 19:26:48 +02:00
Nikos Mavrogiannopoulos
17e71dccd8 Added support for proxy protocol (v2) 2015-07-15 13:03:58 +02:00
Nikos Mavrogiannopoulos
8b186fb53a Allow specifying a PIN and SRK PIN in the config file
That pin will be used to decrypt encrypted key files as well.
2015-06-25 14:12:57 +02:00
Nikos Mavrogiannopoulos
9d621d2b5d certificates and keys were moved to permanent configuration 2015-06-25 13:38:59 +02:00
Nikos Mavrogiannopoulos
a5b2175219 Lifted the limit by MAX_CONFIG_ENTRIES
Now entries in the configuration file are limited by available
memory.
2015-06-17 09:52:02 +02:00
Nikos Mavrogiannopoulos
0abc1ee2db Allow overriding session-timeout from radius 2015-05-19 15:35:46 +02:00
Nikos Mavrogiannopoulos
6ff0a8fb07 Introduced session-timeout option
That allows to set the maximum number of seconds a session can be
active.
2015-05-19 15:07:51 +02:00
Nikos Mavrogiannopoulos
8a0dbb7435 increased timeout in main-secmod communication 2015-05-15 12:56:31 +02:00
Nikos Mavrogiannopoulos
2ed95206e2 simplified request handling in sec-mod 2015-05-14 10:22:37 +02:00