0
0
mirror of https://github.com/OpenVPN/openvpn.git synced 2024-09-20 12:02:28 +02:00
Commit Graph

489 Commits

Author SHA1 Message Date
James Yonan
0db046f253 Added "auth-token" client directive, which is intended to be
pushed by server, and that is used to offer a temporary session
token to clients that can be used in place of a password on
subsequent credential challenges.

This accomplishes the security benefit of preventing caching
of the real password while offering most of the advantages
of password caching, i.e. not forcing the user to re-enter
credentials for every TLS renegotiation or network hiccup.

auth-token does two things:

1. if password caching is enabled, the token replaces the
   previous password, and

2. if the management interface is active, the token is output
   to it:

     >PASSWORD:Auth-Token:<token>

Also made a minor change to HALT/RESTART processing when password
caching is enabled.  When client receives a HALT or RESTART message,
and if the message text contains a flags block (i.e. [FFF]:message),
if flag 'P' (preserve auth) is present in flags, don't purge the Auth
password.  Otherwise do purge the Auth password.

Version 2.1.3o


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7088 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-26 22:29:11 +02:00
James Yonan
1f00199407 win/sign.py now accepts an optional tap-dir argument.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7086 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-26 22:29:11 +02:00
James Yonan
5d2e139852 Version 2.1.3n
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7069 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-26 22:29:11 +02:00
James Yonan
4ff5b53ff8 Client will now try to reconnect if no push reply received
within handshake-window seconds.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7066 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-26 22:29:11 +02:00
James Yonan
e1b99e6b66 Extended "client-kill" management interface command (server-side)
to accept an optional message string.  The message string format is:

  RESTART|HALT,<human-readable-message>

RESTART will tell the client to restart (i.e. SIGUSR1).

HALT will tell the client to exit (i.e. SIGTERM).

On the client, human-readable-message will be communicated via
management interface:

  >NOTIFY,<severity>,<type>,<human-readable-message>"

Version 2.1.3m


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7063 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-26 22:29:11 +02:00
James Yonan
3530e5fba8 Fixed bug introduced in r7031 that might cause this error message:
PORT SHARE: sendmsg failed (unable to communicate with background process)


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7062 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-26 22:29:11 +02:00
James Yonan
ff65da3a23 Fixed issue where a client might receive multiple push replies from
a server if it sent multiple push requests due to the server being
slow to respond.  This could cause the client to process pushed
options twice, leading to duplicate pushed routes, among other issues.
The fix, implemented server-side, is to reply only once to a push
request even if multiple requests are received.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7060 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-26 22:29:11 +02:00
James Yonan
a74b741b61 env_filter_match now includes the serial number of all certs
in chain (as tls_serial_n vars), rather than only tls_serial_0.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7055 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-26 22:29:11 +02:00
James Yonan
9df9e13f7c Reduce log verbosity at level 3, with a focus on removing excessive log verbosity generated by port-share activity.
Version 2.1.3k

git-svn-id: http://svn.openvpn.net/projects/branches/BETA21@7033 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-25 22:13:45 +02:00
James Yonan
1c5ff7722d Added optional journal directory argument to "port-share" directive, for reporting client IP origins of proxied connections.
git-svn-id: http://svn.openvpn.net/projects/branches/BETA21@7031 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-25 22:13:22 +02:00
James Yonan
6c34e74f13 Added --enable-lzo-stub configure option to build an OpenVPN client without LZO, but that has limited interoperability with LZO-enabled servers.
Modified "push-peer-info" option to push IV_LZO_STUB=1 to server when
client was built with --enable-lzo-stub configure option.  This tells
the server that the client lacks LZO capabilities, so the server
should turn off LZO compression for this client via "lzo no".

Added "setenv PUSH_PEER_INFO" option having the same effect as
"push-peer-info".

Version 2.1.3j

git-svn-id: http://svn.openvpn.net/projects/branches/BETA21@7023 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-04-25 22:12:03 +02:00
James Yonan
581bef8708 Added "client-nat" option for stateless, one-to-one
NAT on the client side.

Version 2.1.3i.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6944 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-02-18 17:48:25 +00:00
James Yonan
7ae5fb20d7 Properly handle certificate serial numbers > 32 bits.
Version 2.1.3h


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6931 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-02-14 22:03:44 +00:00
James Yonan
3f7c03a23e Fixes to r6925.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6927 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-02-14 05:20:23 +00:00
James Yonan
6a8ea97069 Implemented get_default_gateway_mac_addr for Mac OS X (previously,
was only defined for Windows and Linux).  This enables OS X to report
the MAC address of the default gateway to the server for ID purposes
when client-side --push-peer-info option is specified.

Also, minor fix to OS X get_default_gateway function:

* include net/route.h directly rather than selectively paste stuff
  from it into route.c


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6925 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-02-14 03:46:37 +00:00
James Yonan
c65e30f520 Fixed minor compile issue triggered on builds where
MANAGEMENT_DEF_AUTH is not enabled.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6830 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-01-18 16:12:13 +00:00
James Yonan
15be3202b2 * added --management-up-down option to allow management interface
to be notified of tunnel up/down events.

* pulled --ip-win32 options will be suppressed on the client
  if --route-nopull option is specified.

Version 2.1.3f


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6813 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-01-10 19:13:02 +00:00
James Yonan
9356bae859 Added --x509-track option.
Version 2.1.3e


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6780 e7ae566f-a301-0410-adde-c780ea21d3b5
2011-01-05 00:50:11 +00:00
James Yonan
ae1884c0cb Misc fixes to r6708.
Fixed issue where "signal SIGTERM" entered from the management
interface might get subsequently downgraded to a SIGUSR1.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6716 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-12-13 09:27:08 +00:00
James Yonan
7621741b48 Minor addition of logging info before and after
execution of Windows net commands.

Version 2.1.3d


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6712 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-12-10 21:17:36 +00:00
James Yonan
2a3d17ed18 Added "management-external-key" option. This option can be used
instead of "key" in client mode, and allows the client to run
without the need to load the actual private key.  When the SSL
protocol needs to perform an RSA sign operation, the data to
be signed will be sent to the management interface via a
notification as follows:

  >RSA_SIGN:[BASE64_DATA]

The management interface client should then sign BASE64_DATA
using the private key and return the signature as follows:

  rsa-sig
  [BASE64_SIG_LINE]
  .
  .
  .
  END

This capability is intended to allow the use of arbitrary
cryptographic service providers with OpenVPN via the
management interface.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6708 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-12-09 11:21:04 +00:00
James Yonan
2d12eb12cf Fixes to prevent compile breakage when --disable-crypto is used.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6656 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-11-16 09:10:39 +00:00
James Yonan
b2dee7d568 In verify_callback, the subject var should be freed by OPENSSL_free,
not free, since it is allocated by OpenSSL.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6655 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-11-16 08:36:18 +00:00
James Yonan
20a4c12783 Version 2.1.3b
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6585 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-10-28 05:01:24 +00:00
James Yonan
d053e36df9 Make base64.h have the same conditional compilation expression as
base64.c.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6569 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-10-24 09:17:24 +00:00
James Yonan
3cf9dd88fd Implement challenge/response authentication support in client mode,
where credentials are entered from stdin.  This capability is
compiled when ENABLE_CLIENT_CR is defined in syshead.h (enabled
by default).

Challenge/response support was previously implemented for creds
that are queried via the management interface.  In this case,
the challenge message will be returned as a custom
client-reason-text string (see management-notes.txt for more
info) on auth failure.

Also, see the comments in misc.c above get_auth_challenge()
for info on the OpenVPN challenge/response protocol.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6568 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-10-24 09:12:47 +00:00
James Yonan
c68e0cddf0 Fixed initialization bug in route_list_add_default_gateway
(Gert Doering).


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6566 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-10-23 22:32:00 +00:00
James Yonan
51e6e5b0f1 Added --proto-force directive.
Version 2.1.3a


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6424 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-09-01 06:04:29 +00:00
James Yonan
1d76ecbcd0 Don't configure Linux tun/tap txqueuelen setting if OpenVPN
txqueuelen directive is set to 0.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6420 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-08-31 21:39:30 +00:00
James Yonan
2e8ff6c1bd Allow PKCS12 file content to be included inline in configuration file,
rendered as base64.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6412 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-08-29 05:24:15 +00:00
James Yonan
5f866d914c Attempt to fix issue where domake-win build system was not properly
signing drivers and .exe files.

Added win/tap_span.py for building multiple versions of the TAP driver
and tapinstall binaries using different DDK versions to span from Win2K
to Win7 and beyond.

Version 2.1.3


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6404 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-08-20 20:24:42 +00:00
James Yonan
4f79d3ec45 Windows security issue:
Fixed potential local privilege escalation vulnerability in
Windows service. The Windows service did not properly quote the
executable filename passed to CreateService.  A local attacker
with write access to the root directory C:\ could create an
executable that would be run with the same privilege level as
the OpenVPN Windows service.  However, since non-Administrative
users normally lack write permission on C:\, this vulnerability
is generally not exploitable except on older versions of Windows
(such as Win2K) where the default permissions on C:\ would allow
any user to create files there.
Credit:  Scott Laurie, MWR InfoSecurity

Version 2.1.2


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6400 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-08-15 21:53:00 +00:00
James Yonan
379b549c81 Added warning about tls-remote in man page.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6384 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-08-10 17:31:31 +00:00
James Yonan
fe7c58f0d2 Distribute win directory (Python/MSVC-based build system)
in "make dist" tarball.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6382 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-08-09 20:15:27 +00:00
James Yonan
75dfe3d7f7 Added "net stop dnscache" and "net start dnscache" in front
of existing --register-dns commands.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6352 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-07-27 21:46:34 +00:00
James Yonan
dc85dae67f Fixed an issue where application payload transmissions on the
TLS control channel (such as AUTH_FAILED) that occur during
or immediately after a TLS renegotiation might be dropped. 

Version 2.1.1n


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6350 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-07-27 07:10:01 +00:00
James Yonan
1400e1c156 Fixed typo: missing comment close.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6347 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-07-26 18:26:49 +00:00
James Yonan
57346f568b Added win/build_exe.py script, which is similar to
win/build_all.py except that it doesn't build the
TAP drivers or tapinstall.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6306 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-07-16 19:08:35 +00:00
James Yonan
b90c6f17b4 Added --register-dns option for Windows.
Fixed some issues on Windows with --log, subprocess creation
for command execution, and stdout/stderr redirection.

Version 2.1.1m.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6304 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-07-16 18:01:11 +00:00
James Yonan
f9b2ada0ee Implemented multi-address DNS expansion on the network field of route
commands.

When only a single IP address is desired from a multi-address DNS
expansion, use the first address rather than a random selection.

Version 2.1.1l


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6291 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-07-12 01:55:54 +00:00
James Yonan
9c110e877c Version 2.1.1k
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6285 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-07-10 03:13:25 +00:00
James Yonan
3796f902a6 Fixed bug in proxy fallback capability where openvpn.exe could
core dump if http-proxy-fallback-disable command was issued in
response to ">PROXY:NEED_NOW management" interface notification.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6284 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-07-10 03:04:27 +00:00
James Yonan
941132efc7 Added support for MSVC debugging of openvpn.exe in settings.in:
# Build debugging version of openvpn.exe
  !define PRODUCT_OPENVPN_DEBUG


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6283 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-07-10 03:00:08 +00:00
James Yonan
d222fcc587 Fixed issue where bad creds provided by the management interface
for HTTP Proxy Basic Authentication would go into an infinite
retry-fail loop instead of requerying the management interface for
new creds.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5701 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-06-10 03:17:21 +00:00
James Yonan
aaf7297467 Implemented a key/value auth channel from client to server.
Version 2.1.1i


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5668 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-06-01 07:12:27 +00:00
James Yonan
3cf6c93282 Implemented http-proxy-override and http-proxy-fallback directives to make it
easier for OpenVPN client UIs to start a pre-existing client config file with
proxy options, or to adaptively fall back to a proxy connection if a direct
connection fails.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5652 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-05-24 22:51:16 +00:00
James Yonan
484e9d36d0 Minor fixes to recent HTTP proxy changes:
* use strcasecmp instead of stricmp

* define HASH and HASHHEX as unsigned char to avoid compiler
  warnings


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5629 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-05-11 19:47:03 +00:00
James Yonan
b27dc04c36 Proxy improvements:
Improved the ability of http-auth "auto" flag to dynamically detect
the auth method required by the proxy.

Added http-auth "auto-nct" flag to reject weak proxy auth methods.

Added HTTP proxy digest authentication method.

Removed extraneous openvpn_sleep calls from proxy.c.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5628 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-05-11 19:32:41 +00:00
James Yonan
8db6234db7 Fixed issue on Windows with MSVC compiler, where TCP_NODELAY support
was not being compiled in.


git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5620 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-05-09 00:03:42 +00:00
James Yonan
564a21094e Updated copyright date to 2010.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5599 e7ae566f-a301-0410-adde-c780ea21d3b5
2010-04-28 16:31:36 +00:00