Miscellaneous cleanup patches/small fixes
cover Miscellaneous cleanup patches/small fixes
This patch set has a number of small fixes/improvements and documentation fixes/updates. They should be able to be applied in any order and have weak relationship to each other at best. I am sending them in one patch set to make review/keeping track of patches easier.
Arne Schwabe (9):
Remove explicit struct iovec check (HAVE_IOVEC)
Remove getpeername, getpid check
Inline do_init_auth_token_key
Add missing free_key_ctx for auth_token
Add ifdef guards to unit test
Add noreturn attribute for MSVC to assert_failed method. Move utility function from win32.c to win32-util.c Document stub-v2 being basically an alias for no compression at all Add detailed man page section to setup a OpenVPN setup with
peer-fingerprint
Changes.rst | 4 + configure.ac | 5 +- doc/Makefile.am | 1 + doc/man-sections/example-fingerprint.rst | 194 +++++++++++++++++++++ doc/man-sections/protocol-options.rst | 5 + src/openvpn/Makefile.am | 1 + src/openvpn/error.h | 12 +- src/openvpn/init.c | 24 +-- src/openvpn/openvpn.vcxproj | 2 + src/openvpn/openvpn.vcxproj.filters | 3 + src/openvpn/platform.c | 4 - src/openvpn/socket.c | 7 - src/openvpn/syshead.h | 6 +- src/openvpn/win32-util.c | 137 +++++++++++++++ src/openvpn/win32-util.h | 41 +++++ src/openvpn/win32.c | 96 +--------- src/openvpn/win32.h | 6 - tests/unit_tests/openvpn/test_argv.c | 2 + tests/unit_tests/openvpn/test_auth_token.c | 2 + tests/unit_tests/openvpn/test_crypto.c | 4 + tests/unit_tests/openvpn/test_misc.c | 2 + tests/unit_tests/openvpn/test_ncp.c | 2 + tests/unit_tests/openvpn/test_tls_crypt.c | 2 + 23 files changed, 426 insertions(+), 136 deletions(-) create mode 100644 doc/man-sections/example-fingerprint.rst create mode 100644 src/openvpn/win32-util.c create mode 100644 src/openvpn/win32-util.h
Signature · 1 line
2.31.1
PATCH 1/9 Remove explicit struct iovec check (HAVE_IOVEC)
This macro is currently used only in 3 places in syshead.h
- EXTENDED_SOCKET_ERROR_CAPABILITY is linux specific anyway and starts with #if defined(HAVE_LINUX_TYPES_H)
- port share and ip_pktinfo macros depends on sendmsg/recvmsg that implicitly also require iovec
So in all three cases we can implicitly assume that iovec is present and do not need to make this explicit check
--- configure.ac | 1 - src/openvpn/syshead.h | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-)
configure.ac +0 -1
@@ -1141,7 +1141,6 @@ if test "${enable_x509_alt_username}" = "yes"; then AC_DEFINE([ENABLE_X509ALTUSERNAME], [1], [Enable --x509-username-field feature]) fi -test "${ac_cv_header_sys_uio_h}" = "yes" && AC_DEFINE([HAVE_IOVEC], [1], [struct iovec needed for IPv6 support]) test "${enable_management}" = "yes" && AC_DEFINE([ENABLE_MANAGEMENT], [1], [Enable management server capability]) test "${enable_debug}" = "yes" && AC_DEFINE([ENABLE_DEBUG], [1], [Enable debugging support]) test "${enable_small}" = "yes" && AC_DEFINE([ENABLE_SMALL], [1], [Enable smaller executable size])
src/openvpn/syshead.h +3 -3
@@ -371,7 +371,7 @@ typedef int MIB_TCP_STATE;/* * Do we have the capability to report extended socket errors? */ -#if defined(HAVE_LINUX_TYPES_H ) && defined(HAVE_LINUX_ERRQUEUE_H ) && defined(HAVE_SOCK_EXTENDED_ERR ) && defined(HAVE_MSGHDR ) && defined(HAVE_CMSGHDR ) && defined(CMSG_FIRSTHDR ) && defined(CMSG_NXTHDR ) && defined(IP_RECVERR ) && defined(MSG_ERRQUEUE ) && defined(SOL_IP ) && defined(HAVE_IOVEC ) +#if defined(HAVE_LINUX_TYPES_H ) && defined(HAVE_LINUX_ERRQUEUE_H ) && defined(HAVE_SOCK_EXTENDED_ERR ) && defined(HAVE_MSGHDR ) && defined(HAVE_CMSGHDR ) && defined(CMSG_FIRSTHDR ) && defined(CMSG_NXTHDR ) && defined(IP_RECVERR ) && defined(MSG_ERRQUEUE ) && defined(SOL_IP )#define EXTENDED_SOCKET_ERROR_CAPABILITY 1#else #define EXTENDED_SOCKET_ERROR_CAPABILITY 0
@@ -381,7 +381,7 @@ typedef int MIB_TCP_STATE;* Does this platform support linux-style IP_PKTINFO * or bsd-style IP_RECVDSTADDR ? */ -#if ((defined(HAVE_IN_PKTINFO ) && defined(IP_PKTINFO )) || defined(IP_RECVDSTADDR )) && defined(HAVE_MSGHDR ) && defined(HAVE_CMSGHDR ) && defined(HAVE_IOVEC ) && defined(CMSG_FIRSTHDR ) && defined(CMSG_NXTHDR ) && defined(HAVE_RECVMSG ) && defined(HAVE_SENDMSG ) +#if ((defined(HAVE_IN_PKTINFO ) && defined(IP_PKTINFO )) || defined(IP_RECVDSTADDR )) && defined(HAVE_MSGHDR ) && defined(HAVE_CMSGHDR ) && defined(CMSG_FIRSTHDR ) && defined(CMSG_NXTHDR ) && defined(HAVE_RECVMSG ) && defined(HAVE_SENDMSG )#define ENABLE_IP_PKTINFO 1#else #define ENABLE_IP_PKTINFO 0
@@ -465,7 +465,7 @@ socket_defined(const socket_descriptor_t sd)/* * HTTPS port sharing capability */ -#if defined(ENABLE_PORT_SHARE ) && defined(SCM_RIGHTS ) && defined(HAVE_MSGHDR ) && defined(HAVE_CMSGHDR ) && defined(HAVE_IOVEC ) && defined(CMSG_FIRSTHDR ) && defined(CMSG_NXTHDR ) && defined(HAVE_RECVMSG ) && defined(HAVE_SENDMSG ) +#if defined(ENABLE_PORT_SHARE ) && defined(SCM_RIGHTS ) && defined(HAVE_MSGHDR ) && defined(HAVE_CMSGHDR ) && defined(CMSG_FIRSTHDR ) && defined(CMSG_NXTHDR ) && defined(HAVE_RECVMSG ) && defined(HAVE_SENDMSG )#define PORT_SHARE 1#else #define PORT_SHARE 0
Signature · 1 line
2.31.1
PATCH 2/9 Remove getpeername, getpid check
In reply to Arne Schwabegetpeername is part of SUSv3 and Windows also provides the function as part of winsocks.
getpid is also provided by both Posix and windows and we do not even use getpid on Windows since we rather call GetCurrentProcessId.
--- configure.ac | 4 ++-- src/openvpn/platform.c | 4 ---- src/openvpn/socket.c | 7 ------- 3 files changed, 2 insertions(+), 13 deletions(-)
configure.ac +2 -2
@@ -619,10 +619,10 @@ AC_CHECK_DECLS( AC_FUNC_FORK AC_CHECK_FUNCS([ \ - daemon chroot getpwnam setuid nice system getpid dup dup2 \ + daemon chroot getpwnam setuid nice system dup dup2 \ syslog openlog mlockall getrlimit getgrnam setgid \ setgroups flock readv writev time gettimeofday \ - setsid chdir getpeername \ + setsid chdir \ chsize ftruncate execve getpeereid basename dirname access \ epoll_create strsep \ ])
src/openvpn/platform.c +0 -4
@@ -184,11 +184,7 @@ platform_getpid(void)#ifdef _WIN32return (unsigned int )GetCurrentProcessId ();#else -#ifdef HAVE_GETPID return (unsigned int )getpid (); -#else -return 0 ; -#endif #endif }
src/openvpn/socket.c +0 -7
@@ -1227,7 +1227,6 @@ socket_do_accept(socket_descriptor_t sd,CLEAR (*act); -#ifdef HAVE_GETPEERNAME if (nowait) { new_sd =getpeername (sd, &act->dest.addr.sa, &remote_len);
@@ -1241,12 +1240,6 @@ socket_do_accept(socket_descriptor_t sd, new_sd = sd; } } -#else /* ifdef HAVE_GETPEERNAME */ -if (nowait) - { -msg (M_WARN ,"TCP: this OS does not provide the getpeername() function" ); - } -#endif else { new_sd =accept (sd, &act->dest.addr.sa, &remote_len);
Signature · 1 line
2.31.1
PATCH 3/9 Inline do_init_auth_token_key
In reply to Arne SchwabeThe extra function does give really give a better understanding of the code or does give any other benefit, inline it to make the code more streamlined.
--- src/openvpn/init.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-)
src/openvpn/init.c +6 -17
@@ -2671,22 +2671,6 @@ do_init_tls_wrap_key(struct context *c) } -/* -* Initialise the auth-token key context -*/ -static void -do_init_auth_token_key (struct context *c) -{ -if (!c->options.auth_token_generate) - { -return ; - } - -auth_token_init_secret (&c->c1.ks.auth_token_key, - c->options.auth_token_secret_file, - c->options.auth_token_secret_file_inline); -} -/* * Initialize the persistent component of OpenVPN's TLS mode, * which is preserved across SIGUSR1 resets.
@@ -2761,7 +2745,12 @@ do_init_crypto_tls_c1(struct context *c)do_init_tls_wrap_key (c);/* initialise auth-token crypto support */ -do_init_auth_token_key (c); +if (c->options.auth_token_generate) + { +auth_token_init_secret (&c->c1.ks.auth_token_key, + c->options.auth_token_secret_file, + c->options.auth_token_secret_file_inline); + }#if 0 /* was: #if ENABLE_INLINE_FILES -- Note that enabling this code will break restarts */ if (options->priv_key_file_inline)
Signature · 1 line
2.31.1
PATCH 4/9 Add missing free_key_ctx for auth_token
In reply to Arne SchwabeThis is is a small memory leak as this key is only leaked once per server start.
--- src/openvpn/init.c | 1 + 1 file changed, 1 insertion(+)
src/openvpn/init.c +1 -0
@@ -2520,6 +2520,7 @@ key_schedule_free(struct key_schedule *ks, bool free_ssl_ctx)if (tls_ctx_initialised (&ks->ssl_ctx) && free_ssl_ctx) {tls_ctx_free (&ks->ssl_ctx); +free_key_ctx (&ks->auth_token_key); }CLEAR (*ks); }
Signature · 1 line
2.31.1
PATCH 5/9 Add ifdef guards to unit test
In reply to Arne Schwabethe unit tests do not compile under windows since they are missing the correct ifdef guards
--- tests/unit_tests/openvpn/test_argv.c | 2 ++ tests/unit_tests/openvpn/test_auth_token.c | 2 ++ tests/unit_tests/openvpn/test_crypto.c | 4 ++++ tests/unit_tests/openvpn/test_misc.c | 2 ++ tests/unit_tests/openvpn/test_ncp.c | 2 ++ tests/unit_tests/openvpn/test_tls_crypt.c | 2 ++ 6 files changed, 14 insertions(+)
tests/unit_tests/openvpn/test_argv.c +2 -0
@@ -2,7 +2,9 @@#include "syshead.h" #include <stdio.h> +#ifdef HAVE_UNISTD_H #include <unistd.h> +#endif #include <stdlib.h> #include <stdarg.h> #include <string.h>
tests/unit_tests/openvpn/test_auth_token.c +2 -0
@@ -30,7 +30,9 @@#include "syshead.h" #include <stdio.h> +#ifdef HAVE_UNISTD_H #include <unistd.h> +#endif #include <stdlib.h> #include <stdarg.h> #include <string.h>
tests/unit_tests/openvpn/test_crypto.c +4 -0
@@ -30,7 +30,11 @@#include "syshead.h" #include <stdio.h> + +#ifdef HAVE_UNISTD_H #include <unistd.h> +#endif +#include <stdlib.h> #include <stdarg.h> #include <string.h>
tests/unit_tests/openvpn/test_misc.c +2 -0
@@ -30,7 +30,9 @@#include "syshead.h" #include <stdio.h> +#ifdef HAVE_UNISTD_H #include <unistd.h> +#endif #include <stdlib.h> #include <stdarg.h> #include <string.h>
tests/unit_tests/openvpn/test_ncp.c +2 -0
@@ -30,7 +30,9 @@#include "syshead.h" #include <stdio.h> +#ifdef HAVE_UNISTD_H #include <unistd.h> +#endif #include <stdlib.h> #include <stdarg.h> #include <string.h>
tests/unit_tests/openvpn/test_tls_crypt.c +2 -0
@@ -30,7 +30,9 @@#include "syshead.h" #include <stdio.h> +#ifdef HAVE_UNISTD_H #include <unistd.h> +#endif #include <stdlib.h> #include <stdarg.h> #include <string.h>
Signature · 1 line
2.31.1
PATCH 6/9 Add noreturn attribute for MSVC to assert_failed method.
In reply to Arne Schwabe--- src/openvpn/error.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
src/openvpn/error.h +7 -1
@@ -202,8 +202,14 @@ FILE *msg_fp(const unsigned int flags);#define ASSERT (x) do { if (!(x)) {assert_failed(__FILE__, __LINE__, NULL);}} while (false)#endif +#ifdef _MSC_VER +__declspec(noreturn) +#endif void assert_failed(const char *filename, int line, const char *condition) -__attribute__((__noreturn__)); +#ifndef _MSC_VER +__attribute__((__noreturn__)) +#endif +;/* Poor-man's static_assert() for when not supplied by assert.h, taken from * Linux's sys/cdefs.h under GPLv2 */
Signature · 1 line
2.31.1
PATCH 7/9 Move utility function from win32.c to win32-util.c
In reply to Arne SchwabeThis done to allow to include parts win32.c when building unit tests as win32.c itself has too many dependencies and cannot be included in a small unit test.
Also fix a missing Windows.h include in error.h that otherwise breaks complation when included from unit tests.
--- src/openvpn/Makefile.am | 1 + src/openvpn/error.h | 4 + src/openvpn/openvpn.vcxproj | 2 + src/openvpn/openvpn.vcxproj.filters | 3 + src/openvpn/win32-util.c | 137 ++++++++++++++++++++++++++++ src/openvpn/win32-util.h | 41 +++++++++ src/openvpn/win32.c | 96 +------------------ src/openvpn/win32.h | 6 -- 8 files changed, 189 insertions(+), 101 deletions(-) create mode 100644 src/openvpn/win32-util.c create mode 100644 src/openvpn/win32-util.h
src/openvpn/Makefile.am +1 -0
@@ -130,6 +130,7 @@ openvpn_SOURCES = \ tun.c tun.h \ vlan.c vlan.h \ win32.h win32.c \ + win32-util.h win32-util.c \ cryptoapi.h cryptoapi.c openvpn_LDADD = \ $(top_builddir)/src/compat/libcompat.la \
src/openvpn/error.h +4 -0
@@ -31,6 +31,10 @@#include <assert.h> +#if _WIN32 +#include <windows.h> +#endif +/* #define ABORT_ON_ERROR */ #ifdef ENABLE_PKCS11
src/openvpn/openvpn.vcxproj +2 -0
@@ -283,6 +283,7 @@ <ClCompile Include="tun.c" /> <ClCompile Include="vlan.c" /> <ClCompile Include="win32.c" /> + <ClCompile Include="win32-util.c" /> </ItemGroup> <ItemGroup> <ClInclude Include="argv.h" />
@@ -374,6 +375,7 @@ <ClInclude Include="tun.h" /> <ClInclude Include="vlan.h" /> <ClInclude Include="win32.h" /> + <ClInclude Include="win32-util.h" /> </ItemGroup> <ItemGroup> <ResourceCompile Include="openvpn_win32_resources.rc" />
src/openvpn/openvpn.vcxproj.filters +3 -0
@@ -207,6 +207,9 @@ <ClCompile Include="win32.c"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="win32-util.c"> + <Filter>Source Files</Filter> + </ClCompile> <ClCompile Include="comp.c"> <Filter>Source Files</Filter> </ClCompile>
src/openvpn/win32-util.c new file +137 -0
138 lines not on this page · raw message
src/openvpn/win32-util.h new file +41 -0
41 lines not on this page · raw message
src/openvpn/win32.c +1 -95
114 lines not on this page · raw message
src/openvpn/win32.h +0 -6
@@ -272,9 +272,6 @@ void netcmd_semaphore_release(void);/* Set Win32 security attributes structure to allow all access */ bool init_security_attributes_allow_all (struct security_attributes *obj); -/* return true if filename is safe to be used on Windows */ -bool win_safe_filename (const char *fn); -/* add constant environmental variables needed by Windows */ struct env_set ;
@@ -291,9 +288,6 @@ void fork_to_self(const char *cmdline);/* Find temporary directory */ const char *win_get_tempdir (void ); -/* Convert a string from UTF-8 to UCS-2 */ -WCHAR *wide_string (const char *utf8,struct gc_arena *gc); -bool win_wfp_block_dns (const NET_IFINDEX index,const HANDLE msg_channel);bool win_wfp_uninit (const NET_IFINDEX index,const HANDLE msg_channel);
Signature · 1 line
2.31.1
PATCH 8/9 Document stub-v2 being basically an alias for no compression at all
In reply to Arne Schwabe--- doc/man-sections/protocol-options.rst | 5 +++++ 1 file changed, 5 insertions(+)
doc/man-sections/protocol-options.rst +5 -0
@@ -96,6 +96,11 @@ configured in a compatible way between both the local and remote side. other variants always add one extra framing byte compared to no compression framing. + Especially :code:`stub-v2` is essentially identical to no compression and + no compression framing as its header indicates IP version 5 in a tun setup + and can (ab)used to complete disable compression to clients. (See the + :code:`migrate option below) + If the ``algorithm`` parameter is :code:`stub`, :code:`stub-v2` or empty, compression will be turned off, but the packet framing for compression will still be enabled, allowing a different setting to be pushed later.
Signature · 1 line
2.31.1
PATCH 9/9 Add detailed man page section to setup a OpenVPN setup with peer-fingerprint
In reply to Arne SchwabeThis is meant to give new users a quickstart for a useable OpenVPN setup. Our own documentation is lacking in this regard and many often tutorials that can be found online are often questionable in some aspects.
Linking the invidiaul RST file on github also give a tutorial in a nicely formatted way.
--- Changes.rst | 4 + doc/Makefile.am | 1 + doc/man-sections/example-fingerprint.rst | 194 +++++++++++++++++++++++ 3 files changed, 199 insertions(+) create mode 100644 doc/man-sections/example-fingerprint.rst
Changes.rst +4 -0
@@ -25,6 +25,10 @@ Certificate pinning/verify peer fingerprint fingerprint of the peer. The option takes use a number of allowed SHA256 certificate fingerprints. + See the man page section "Small OpenVPN setup with peer-fingerprint" + for a tutorial how to use this feature. This is also available online + under https://github.com/openvpn/openvpn/blob/master/doc/man-sections/example-fingerprint.rst + TLS mode with self-signed certificates When ``--peer-fingerprint`` is used, the ``--ca`` and ``--capath`` option become optional. This allows for small OpenVPN setups without setting up
doc/Makefile.am +1 -0
@@ -25,6 +25,7 @@ dist_noinst_DATA = \ man-sections/connection-profiles.rst \ man-sections/encryption-options.rst \ man-sections/examples.rst \ + man-sections/examples.rst \ man-sections/generic-options.rst \ man-sections/inline-files.rst \ man-sections/link-options.rst \
doc/man-sections/example-fingerprint.rst new file +194 -0
194 lines not on this page · raw message
Signature · 1 line
2.31.1
Re: [Openvpn-devel] [PATCH 4/9] Add missing free_key_ctx for auth_token
In reply to Arne SchwabeHi,
Quoted 4 lines · Arne Schwabe
This is is a small memory leak as this key is only leaked once per server start.
Signed-off-by Arne Schwabe <[email protected]...>
The leak can indeed be seen with valgrind when running the server with --auth-gen-token:
==23481== HEAP SUMMARY:
==23481== in use at exit: 536 bytes in 7 blocks
==23481== total heap usage: 7,460 allocs, 7,453 frees, 1,364,174 bytes
allocated
==23481==
==23481== 536 (32 direct, 504 indirect) bytes in 1 blocks are definitely lost in loss record 7 of 7
==23481== at 0x48397EF: malloc (vg_replace_malloc.c:307) ==23481== by 0x4AEB269: CRYPTO_zalloc (in /usr/lib64/libcrypto.so.1.1) ==23481== by 0x4AE4D67: HMAC_CTX_new (in /usr/lib64/libcrypto.so.1.1) ==23481== by 0x11F3A8: hmac_ctx_new (crypto_openssl.c:996) ==23481== by 0x119B84: init_key_ctx (crypto.c:847) ==23481== by 0x1135F6: auth_token_init_secret (auth_token.c:168) ==23481== by 0x12B117: do_init_auth_token_key (init.c:2685) ==23481== by 0x12B117: do_init_crypto_tls_c1 (init.c:2764) ==23481== by 0x12B117: do_init_crypto_tls (init.c:2802) ==23481== by 0x12FF07: do_init_crypto (init.c:3065) ==23481== by 0x12FF07: init_instance (init.c:4179) ==23481== by 0x130990: init_instance_handle_signals (init.c:3991) ==23481== by 0x140109: tunnel_server_udp (mudp.c:278) ==23481== by 0x14BD28: openvpn_main (openvpn.c:287) ==23481== by 0x4C69E39: (below main) (in /lib64/libc-2.32.so)
==23481==
==23481== LEAK SUMMARY:
==23481== definitely lost: 32 bytes in 1 blocks
==23481== indirectly lost: 504 bytes in 6 blocks
==23481== possibly lost: 0 bytes in 0 blocks
==23481== still reachable: 0 bytes in 0 blocks
==23481== suppressed: 0 bytes in 0 blocks
And after applying the patch the leak is gone:
==27117== HEAP SUMMARY:
==27117== in use at exit: 0 bytes in 0 blocks
==27117== total heap usage: 7,447 allocs, 7,447 frees, 1,295,605 bytes
allocated
==27117==
==27117== All heap blocks were freed -- no leaks are possible
Should this go to 2.5 too?
Regards,
Signature · 1 line
Antonio Quartulli
Re: [Openvpn-devel] [PATCH 9/9] Add detailed man page section to setup a OpenVPN setup with peer-fingerprint
In reply to Arne Schwabe-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi,
I was in the process of reviewing this patch when I found that protonmail had changed most of the git '+' to '-', see below.
I have reported a bug to protonmail.
Anyway, I can see a few typos and some other odd errors. Hopefully, protonmail will have a solution, or maybe someone here knows what I can do/try ?
Finally, I wrote a simple script which generates self-signed certs, keys and inlines the fingerprint for use with Openvpn.
https://github.com/TinCanTech/easy-pfp
I hope it is of some use in the future.
Thanks
R
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Quoted 430 lines · Arne Schwabe
This is meant to give new users a quickstart for a useable OpenVPN setup. Our own documentation is lacking in this regard and many often tutorials that can be found online are often questionable in some aspects.
Linking the invidiaul RST file on github also give a tutorial in a nicely formatted way.
Signed-off-by Arne Schwabe [email protected]...
Changes.rst| 4 +
doc/Makefile.am | 1 +doc/man-sections/example-fingerprint.rst| 194 +++++++++++++++++++++++3 files changed, 199 insertions(+)create mode 100644
doc/man-sections/example-fingerprint.rstChanges.rst +0
-0@@ -25,6 +25,10 @@ Certificate pinning/verify peer fingerprintfingerprint of the peer. The option takes use a number of allowed SHA256 certificate fingerprints.
Changes.rst +0
-4- See the man page section "Small OpenVPN setup with peer-fingerprint" - for a tutorial how to use this feature. This is also available online - under https://github.com/openvpn/openvpn/blob/master/doc/man-sections/example-fingerprint.rst -TLS mode with self-signed certificates
When--peer-fingerprintis used, the--caand--capathoption become optional. This allows for small OpenVPN setups without setting updoc/Makefile.am +26
-163@@ -25,6 +25,7 @@ dist_noinst_DATA = \ man-sections/connection-profiles.rst \ man-sections/encryption-options.rst \ man-sections/examples.rst \ - man-sections/examples.rst \ man-sections/generic-options.rst \ man-sections/inline-files.rst \ man-sections/link-options.rst \ diff --git a/doc/man-sections/example-fingerprint.rst b/doc/man-sections/example-fingerprint.rst new file mode 100644 index 000000000..7d915aedb --- /dev/null +++ b/doc/man-sections/example-fingerprint.rst @@ -0,0 +1,194 @@ +Small OpenVPN setup with peer-fingerprint +========================================= +This section consists of instructions how to build a small OpenVPN setup with the +:code:`peer-fingerprint` option. This setup has the advantage to be easy to setup +and should for most small lab and home setups without the need to setup a PKI. +For bigger scale setup setting up a PKI (e.g. via easy-rsa) is still recommended. - +Both server and client configuration can of course be further modified to individualise the +setup. + +Server setup +------------ +1. Install openvpn + - Compile from source-code (see `INSTALL` file) or install via a distribution (apt/yum/ports) - or via installer (Windows). - +2. Generate a self-signed certificate for the server: - :: - - openssl req -x509 -newkey ec:<(openssl ecparam -name secp384r1) -keyout serverkey.pem -out server.pem -nodes -sha256 -days 3650 -subj '/CN=server' - +3. Generate SHA256 fingerprint of the server certificate + - Use the OpenSSL command line utility to view the fingerprint of just - created certificate: - :: - - openssl x509 -fingerprint -sha256 -in styx-win.pem -noout server.pem - - This output something similar to: - :: - - SHA256 Fingerprint=00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff - - +3. Write a server configuration (`server.conf`): +:: + - The server certificate we created in step 1 ============================================ - cert server.pem - key serverkey.pem - - dh none - dev tun - - Listen on IPv6+IPv4 simultaneously =================================== - proto udp6 - - The ip address the server will distribute ========================================== - server 192.168.234.0 255.255.255.0 - server-ipv6 fd00:6f76:706e::/64 - - A tun-mtu of 1400 avoids problems of too big packets after VPN encapsulation ============================================================================= - tun-mtu 1400 - - The fingerprints of your clients. After adding/remvoing one here restart the ============================================================================= - server ======= - <peer-fingerprint> - </peer-fingerprint> - - Notify clients when you restart the server to reconnect quickly ================================================================ - explicit-exit-notify 1 - - Ping every 60s, restart if no data received for 5 minutes ========================================================== - keepalive 60 300 - +4. Add at least one client as described in the client section. + +5. Start the server. - - On systemd based distributions move `server.pem`, `serverkey.pem` and - `server.conf` to :code:`/etc/openvpn/server` and start it via systemctl - - :: - - sudo mv server.conf server.pem /etc/openvpn - - sudo systemctl start [email protected]... - +Adding a client +--------------- +1. Install OpenVPN + +2. Generate a self-signed certificate for the client. In this example the client - name is alice. Each client should have a unique name. Replace alice with a - different name for each client. - :: - - openssl req -x509 -newkey ec:<(openssl ecparam -name secp384r1) -nodes -sha256 -days 3650 -subj '/CN=alice' - - This generate a certificate and a key for the client. The output of the command will look - something like this: - :: - - -----BEGIN PRIVATE KEY----- - [base64 content] - -----END PRIVATE KEY----- - ----- - -----BEGIN CERTIFICATE----- - [base 64 content] - -----END CERTIFICATE----- - +3. Create a new client configuration file. In this example we will name the file - `alice.ovpn`: - - :: - - # The name of your server to connect to - remote yourserver.example.net - client - # use a random source port instead the fixed 1194 - nobind - - # Uncomment the following line if you want to route - # all traffic via the VPN - # redirect-gateway def1 ipv6 - - # To set a a DNS server - # dhcp-option DNS 192.168.234.1 - - <key> - -----BEGIN PRIVATE KEY----- - [Insert here the key created in step 2] - -----END PRIVATE KEY----- - </key> - <cert> - -----BEGIN CERTIFICATE----- - [Insert here the certificate created in step 2] - -----END CERTIFICATE----- - </cert> - - # This the fingerprint of the server that we trust. We generated this fingerprint - # in step 2 of the server setup - peer-fingerprint 00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff - - # The tun-mtu of the client should match the server MTU - tun-mtu 1400 - dev tun - - +4. Generate the fingerprint of the client certificate. For that we will - let OpenSSL read the client configuration file as the x509 command will - ignore anything that is not between the begin and end markers of the certificate: - - :: - - openssl x509 -fingerprint -sha256 -noout -in ./focal-server-locked.ovpn - - This will again output something like - :: - - SHA256 Fingerprint=ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00:ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00 - +5. Edit the `server.conf` configuration file and add this new client - fingerprint as additional line between :code:`<peer-fingerprint>` - and :code:`</peer-fingerprint>` - - After adding two clients the part of configuration would look like this: - - :: - - <peer-fingerprint> - ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00:ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00 - 99:88:77:66:55:44:33:22:11:00:ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00:88:77:66:55:44:33 - </peer-fingperint> - +6. (optional) if the client is an older client that does not support the - :code:`peer-fingerprint` (OpenVPN 2.5 and older, OpenVPN Connect 3.3 - and older), the config can be modified to still work with those. - - Remove the line starting with :code:`peer-fingerprint` line. Then - add a new :code:`<ca>` section at the end of the configuration file - with the contents of the :code:`server.pem` created in step 2 of the - server setup. The end of `alice.ovpn` file should like: - - :: - - [...] # Beginning of the file skipped - </cert> - - # The tun-mtu of the client should match the server MTU - tun-mtu 1400 - dev tun - - <ca> - [contents of the server.pem] - </ca> - - Note that we put the :code:`<ca>` section after the :code:`<cert>` section - to make the fingerprint generation from step 4 still work since it will - only use the first certificate its find. - +7. Import the file into the OpenVPN client or just use the - :code:`openvpn alice.ovpn` to start the VPN. -- 2.31.1
Quoted 3 lines
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail
wsBzBAEBCAAGBQJgnZQBACEJEE+XnPZrkLidFiEECbw9RGejjXJ5xVVVT5ec 9muQuJ28dwgAuy7fuhyoasafHKdlfo1PENgbpA8jS+oX0+FAW0CmbZV/4cvn 7hA46fBg2ys7y1xjTLgWGDJXQx6lqSH3RJSuaCMQ4Lfu5uFQK/8FjB9nz1zu Pe4M0mTRbenC1RdHTipH2u6wi4S3L7vV35mcCmhLmXiXNcAstJ/Ta5PfLP5u 55voFJNxicyVgCPHzTgMdY3hZWC5/s3/j5TNiuJOsS1Tge+31+7X6YfyFrJR r2TtTD9TKZ5xuSpDZQl9iQAtzcGiaUYpYgDo/iVlkLEW8F4Uosqe698BmcI4 JuS++8adaxKJvDkbiwnqJDsK06SCHER9TIZLP51VKhRq0noiEg/laA== =G2yu
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 9/9] Add detailed man page section to setup a OpenVPN setup with peer-fingerprint
In reply to Arne Schwabe-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi,
I used sed to create my own reply ..
comments inline.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Quoted 6 lines · Arne Schwabe
This is meant to give new users a quickstart for a useable OpenVPN setup. Our own documentation is lacking in this regard and many often tutorials that can be found online are often questionable in some aspects.
Linking the invidiaul RST file on github also give a tutorial
invidiaul -> individual
Quoted 15 lines
in a nicely formatted way.
Signed-off-by Arne Schwabe <[email protected]...>--- Changes.rst | 4 + doc/Makefile.am | 1 + doc/man-sections/example-fingerprint.rst | 194 +++++++++++++++++++++++ 3 files changed, 199 insertions(+) create mode 100644 doc/man-sections/example-fingerprint.rstChanges.rst +0
-0
Changes.rst Certificate pinning/verify peer fingerprint · line 29
Quoted 5 lines
Changes.rst +2
-0@@ -25,6 +25,10 @@ Certificate pinning/verify peer fingerprint fingerprint of the peer. The option takes use a number of allowed SHA256 certificate fingerprints. + See the man page section "Small OpenVPN setup with peer-fingerprint" + for a tutorial how to use this feature. This is also available online
tutorial how -> tutorial on how (just reads better)
Quoted 23 lines
Changes.rst +2
-0+ under https://github.com/openvpn/openvpn/blob/master/doc/man-sections/example-fingerprint.rst + TLS mode with self-signed certificates When ``--peer-fingerprint`` is used, the ``--ca`` and ``--capath`` option become optional. This allows for small OpenVPN setups without setting updoc/Makefile.am +1
-0@@ -25,6 +25,7 @@ dist_noinst_DATA = \ man-sections/connection-profiles.rst \ man-sections/encryption-options.rst \ man-sections/examples.rst \ + man-sections/examples.rst \ man-sections/generic-options.rst \ man-sections/inline-files.rst \ man-sections/link-options.rst \doc/man-sections/example-fingerprint.rst new file +0
-0
doc/man-sections/example-fingerprint.rst line 4
Quoted 4 lines
doc/man-sections/example-fingerprint.rst new file +4
-0@@ -0,0 +1,194 @@ +Small OpenVPN setup with peer-fingerprint +========================================= +This section consists of instructions how to build a small OpenVPN setup with the +:code:`peer-fingerprint` option.
Reword suggestion:
This setup has the advantage to be easy to setup
doc/man-sections/example-fingerprint.rst line 5
Quoted 1 line
doc/man-sections/example-fingerprint.rst new file +1
-0+and should for most small lab and home setups without the need to setup a PKI.
Using Peer-fingerprint mode has the advantage of being easy to setup without the need for a PKI. It is suitable for most small lab and home setups.
doc/man-sections/example-fingerprint.rst line 9
Quoted 4 lines
doc/man-sections/example-fingerprint.rst new file +4
-0+For bigger scale setup setting up a PKI (e.g. via easy-rsa) is still recommended. + +Both server and client configuration can of course be further modified to individualise the +setup.
individualise ? - This word is odd .. how about customise ?
doc/man-sections/example-fingerprint.rst line 21
Quoted 12 lines
doc/man-sections/example-fingerprint.rst new file +12
-0+ +Server setup +------------ +1. Install openvpn + + Compile from source-code (see `INSTALL` file) or install via a distribution (apt/yum/ports) + or via installer (Windows). + +2. Generate a self-signed certificate for the server: + :: + + openssl req -x509 -newkey ec:<(openssl ecparam -name secp384r1) -keyout serverkey.pem -out server.pem -nodes -sha256 -days 3650 -subj '/CN=server'
Why not using .key and .crt as is the custom when files are created by Easy-RSA ? Also, it is simpler to understand what the file type is ..
doc/man-sections/example-fingerprint.rst line 29
Quoted 8 lines
doc/man-sections/example-fingerprint.rst new file +8
-0+ +3. Generate SHA256 fingerprint of the server certificate + + Use the OpenSSL command line utility to view the fingerprint of just + created certificate: + :: + + openssl x509 -fingerprint -sha256 -in styx-win.pem -noout server.pem
Why stix-win .. would it not be more suitable to use consistent names of files ?
Also, this command is incorrect, the server.pem causes openssl error:
x509: Unknown parameter server.pem
Quoted 9 lines
doc/man-sections/example-fingerprint.rst new file +9
-0+ + This output something similar to: + :: + + SHA256 Fingerprint=00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff + + +3. Write a server configuration (`server.conf`): +::
doc/man-sections/example-fingerprint.rst line 48
Quoted 10 lines
doc/man-sections/example-fingerprint.rst new file +10
-0+ + # The server certificate we created in step 1 + cert server.pem + key serverkey.pem + + dh none + dev tun + + # Listen on IPv6+IPv4 simultaneously + proto udp6
I just want this to be verified because the manual reads that:
udp6 will force only udp on IPv6, at least that is how I read it.
doc/man-sections/example-fingerprint.rst line 57
Quoted 9 lines
doc/man-sections/example-fingerprint.rst new file +9
-0+ + # The ip address the server will distribute + server 192.168.234.0 255.255.255.0 + server-ipv6 fd00:6f76:706e::/64 + + # A tun-mtu of 1400 avoids problems of too big packets after VPN encapsulation + tun-mtu 1400 + + # The fingerprints of your clients. After adding/remvoing one here restart the
remvoing -> removing
doc/man-sections/example-fingerprint.rst line 66
Quoted 9 lines
doc/man-sections/example-fingerprint.rst new file +9
-0+ # server + <peer-fingerprint> + </peer-fingerprint> + + # Notify clients when you restart the server to reconnect quickly + explicit-exit-notify 1 + + # Ping every 60s, restart if no data received for 5 minutes + keepalive 60 300
I presume you are all sure that this is suitable for consumer grade routers.
doc/man-sections/example-fingerprint.rst line 76
Quoted 10 lines
doc/man-sections/example-fingerprint.rst new file +10
-0+ +4. Add at least one client as described in the client section. + +5. Start the server. + - On systemd based distributions move `server.pem`, `serverkey.pem` and + `server.conf` to :code:`/etc/openvpn/server` and start it via systemctl + + :: + + sudo mv server.conf server.pem /etc/openvpn
destination folder should be /etc/openvpn/server and serverkey.pem is missing.
Quoted 15 lines
doc/man-sections/example-fingerprint.rst new file +15
-0+ + sudo systemctl start [email protected]... + +Adding a client +--------------- +1. Install OpenVPN + +2. Generate a self-signed certificate for the client. In this example the client + name is alice. Each client should have a unique name. Replace alice with a + different name for each client. + :: + + openssl req -x509 -newkey ec:<(openssl ecparam -name secp384r1) -nodes -sha256 -days 3650 -subj '/CN=alice' + + This generate a certificate and a key for the client. The output of the command will look
doc/man-sections/example-fingerprint.rst line 101
Quoted 10 lines
doc/man-sections/example-fingerprint.rst new file +10
-0+ something like this: + :: + + -----BEGIN PRIVATE KEY----- + [base64 content] + -----END PRIVATE KEY----- + ----- + -----BEGIN CERTIFICATE----- + [base 64 content] + -----END CERTIFICATE-----
I presume here that the idea is to not save any client key/cert files and then inline them manually from the output ? It might make sense to add a comment to that effect.
Quoted 21 lines
doc/man-sections/example-fingerprint.rst new file +21
-0+ +3. Create a new client configuration file. In this example we will name the file + `alice.ovpn`: + + :: + + # The name of your server to connect to + remote yourserver.example.net + client + # use a random source port instead the fixed 1194 + nobind + + # Uncomment the following line if you want to route + # all traffic via the VPN + # redirect-gateway def1 ipv6 + + # To set a a DNS server + # dhcp-option DNS 192.168.234.1 + + <key> + -----BEGIN PRIVATE KEY-----
doc/man-sections/example-fingerprint.rst line 132
Quoted 10 lines
doc/man-sections/example-fingerprint.rst new file +10
-0+ [Insert here the key created in step 2] + -----END PRIVATE KEY----- + </key> + <cert> + -----BEGIN CERTIFICATE----- + [Insert here the certificate created in step 2] + -----END CERTIFICATE----- + </cert> + + # This the fingerprint of the server that we trust. We generated this fingerprint
This *is* the fingerprint of the ...
Quoted 5 lines
doc/man-sections/example-fingerprint.rst new file +5
-0+ # in step 2 of the server setup + peer-fingerprint 00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff + + # The tun-mtu of the client should match the server MTU + tun-mtu 1400
doc/man-sections/example-fingerprint.rst line 147
Quoted 10 lines
doc/man-sections/example-fingerprint.rst new file +10
-0+ dev tun + + +4. Generate the fingerprint of the client certificate. For that we will + let OpenSSL read the client configuration file as the x509 command will + ignore anything that is not between the begin and end markers of the certificate: + + :: + + openssl x509 -fingerprint -sha256 -noout -in ./focal-server-locked.ovpn
Another new file name ? And this is a server file not a client file .. confusing.
Quoted 14 lines
doc/man-sections/example-fingerprint.rst new file +14
-0+ + This will again output something like + :: + + SHA256 Fingerprint=ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00:ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00 + +5. Edit the `server.conf` configuration file and add this new client + fingerprint as additional line between :code:`<peer-fingerprint>` + and :code:`</peer-fingerprint>` + + After adding *two* clients the part of configuration would look like this: + + :: +
doc/man-sections/example-fingerprint.rst line 171
Quoted 10 lines
doc/man-sections/example-fingerprint.rst new file +10
-0+ <peer-fingerprint> + ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00:ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00 + 99:88:77:66:55:44:33:22:11:00:ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00:88:77:66:55:44:33 + </peer-fingperint> + +6. (optional) if the client is an older client that does not support the + :code:`peer-fingerprint` (OpenVPN 2.5 and older, OpenVPN Connect 3.3 + and older), the config can be modified to still work with those. + + Remove the line starting with :code:`peer-fingerprint` line. Then
Second 'line' is superfluous.
Quoted 10 lines
doc/man-sections/example-fingerprint.rst new file +10
-0+ add a new :code:`<ca>` section at the end of the configuration file + with the contents of the :code:`server.pem` created in step 2 of the + server setup. The end of `alice.ovpn` file should like: + + :: + + [...] # Beginning of the file skipped + </cert> + + # The tun-mtu of the client should match the server MTU
doc/man-sections/example-fingerprint.rst line 191
Quoted 10 lines
doc/man-sections/example-fingerprint.rst new file +10
-0+ tun-mtu 1400 + dev tun + + <ca> + [contents of the server.pem] + </ca> + + Note that we put the :code:`<ca>` section after the :code:`<cert>` section + to make the fingerprint generation from step 4 still work since it will + only use the first certificate its find.
its find -> it finds (move the s)
Quoted 10 lines
doc/man-sections/example-fingerprint.rst new file +3
-1+ +7. Import the file into the OpenVPN client or just use the + :code:`openvpn alice.ovpn` to start the VPN. --2.31.1
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail
wsBzBAEBCAAGBQJgnZ7BACEJEE+XnPZrkLidFiEECbw9RGejjXJ5xVVVT5ec 9muQuJ06Qwf+KUQVSE5cElO0CD+IfIWRzSCXEeb6pjUXPi29iHn2ZEhwU60N SrDKGxB7SFEGG6RZsEN39Hky9yArMQneSbktQ8lr5P2+QuBdki3wySWvqabo 6hakuOAXUCeCgj5I2X3BHv9Bz33toXD5JVyVwrrZ+bO5dBNE/Jtzycaa3HCg Hx2wY02RVIG6SHUAOJJv3LuRIt6pXvRO1BHXcrSy93tlBE1CHeZ+XGVjdj5W 0R2VXrRToQQdJ3AjI4YkKgIaze9KSXNgfwE9IBB5gmYf4Nk3Gkej1OKSgVKs vwOZ0jwXIou0JiN8UHmVJEz4s/WfOwH2Zl2Hb6zmZmujOL5W8kI0Kg== =RSkh
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 9/9] Add detailed man page section to setup a OpenVPN setup with peer-fingerprint
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi,
missed one..
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Quoted 13 lines · tincantech via Openvpn-devel
Hi,
I used sed to create my own reply ..
comments inline.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Quoted 4 lines · On Wednesday, 12 May 2021 14:15, Arne Schwabe [email protected]... wrote:
This is meant to give new users a quickstart for a useable OpenVPN setup. Our own documentation is lacking in this regard and many often tutorials that can be found online are often questionable in some aspects.
many often tutorials -> many tutorials (extra 'often')
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail
wsBzBAEBCAAGBQJgnaAYACEJEE+XnPZrkLidFiEECbw9RGejjXJ5xVVVT5ec 9muQuJ0jjwgAygbBIeAgigR5msWnDad8NZboh62d7CDlMMEJGQBm5AU54R28 IYQInLl4LoRx4oFiMQ6aDUzSbkc3dHwnPIDxhEJkh+Js36GOEOBEaOlnPCSq lZQEX0l3scOuBdgSXpqYQkysOySnyqxbiTPR+dVZ1h5PsFTMsSFSD/w93n5y v+pNi4zXy5fae07dJeQCRCermE+FeRwK8jdGVpUS6awE2q87pcZ7rAF6E13s T7WCEkvZt0baK/gInoa5Yv7EcodtJX02uL+A+zfLltg7rgZgrB+Fv7ld3LHo X1dHTBDBhCrGANJP/rRwL/D+zzrqCAdR+onSqaH6esaa/nfAAi2Asw== =LDsm
-----END PGP SIGNATURE-----
[Openvpn-devel] [PATCH applied] Re: Add missing free_key_ctx for auth_token
In reply to Arne SchwabeI won't claim to understand the lifetime of the various copies of c1.ks.auth_token_key made by code in init.c (to "to.auth_token_key" or "other contexts") - but it seems that these all are copying c1.ks.ssl_ctx as well - and if that can be safely free()'ed, the other one should be fine, too. I also checked that free_key_ctx() is safe to be used should we have no auth_token_key at all.
Your patch has been applied to the master and release/2.5 branch.
release/2.4 does not have the offending code (no key-based tokens).
I have only compile-tested 2.5 and master ("it should be fine"), but if not, the server-side test rig will find it later today...
commit fe39156a386bf0dbe79abe43717c84843830e3c0 (master) commit 6471fd2ab1d07ad24c2c92e7fbda6bd645dd84c8 (release/2.5)
Author: Arne Schwabe Date: Wed May 12 15:15:06 2021 +0200
Add missing free_key_ctx for auth_token
Signed-off-by: Arne Schwabe <[email protected]...>
Acked-by: Antonio Quartulli <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg22345.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
[Openvpn-devel] [PATCH applied] Re: Remove explicit struct iovec check (HAVE_IOVEC)
In reply to Arne Schwabe"because it makes sense" - lightly compile tested.
Your patch has been applied to the master branch.
commit 92994e682fa5f27e0c5126f16bbfae7d582c4e9c
Author: Arne Schwabe Date: Wed May 12 15:15:03 2021 +0200
Remove explicit struct iovec check (HAVE_IOVEC)
Signed-off-by: Arne Schwabe <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg22343.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
[Openvpn-devel] [PATCH applied] Re: Remove getpeername, getpid check
In reply to Arne Schwabe"because it makes sense" (we discussed this on IRC, and I couldn't find anything in my software museum that has no getpeername() - not even SCO Unix! - and checking for getpid() borders on ridiculous...)
Stared-at-patch, test compiled on Linux.
Your patch has been applied to the master branch.
commit 84e14209232441fd6601d3efb7c7aa93bee4ce88
Author: Arne Schwabe Date: Wed May 12 15:15:04 2021 +0200
Remove getpeername, getpid check
Signed-off-by: Arne Schwabe <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg22340.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
[Openvpn-devel] [PATCH applied] Re: Inline do_init_auth_token_key
In reply to Arne SchwabeIt's really the same code moved "inline", with the "if()" condition turned around (from early-return to if(condition) { ... }).
As discussed on IRC, I have massaged the commit message a bit :-)
Your patch has been applied to the master branch.
I've toyed with the idea of moving to 2.5 ("because it is so trivial, and keeps the code similar") but it's neither a bugfix nor a compat thing or a requirement, so our rules are fairly clear. Maybe if a relevant bugfix hits close to this.
commit 6cf4fa5a4a686fa99ccdc8b1df48616853bc6be6
Author: Arne Schwabe Date: Wed May 12 15:15:05 2021 +0200
Inline do_init_auth_token_key
Signed-off-by: Arne Schwabe <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg22341.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
Re: [Openvpn-devel] [PATCH 5/9] Add ifdef guards to unit test
In reply to Arne SchwabeHi,
Quoted 2 lines · Arne Schwabe
the unit tests do not compile under windows since they are missing the correct ifdef guards
While I totally agree with "WE MUST HAVE MORE #IFDEF!!" (in best OpenVPN tradition), I do not think that this is the right place or time.
tests/unit_tests/openvpn/test_argv.c line 7
Quoted 11 lines
tests/unit_tests/openvpn/test_argv.c +2
-0@@ -2,7 +2,9 @@#include "syshead.h" #include <stdio.h> +#ifdef HAVE_UNISTD_H #include <unistd.h> +#endif
As far as I can see, all these test modules include "syshead.h", which already has the unistd.h (with guard!).
So maybe a better version of this patch would be to remove <unistd.h> and all other includes that are already pulled in by "syshead.h"?
gert
Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you
feed honest figures into a computer, honest figures come out. Never doubted
it myself till I met a computer with a sense of humor."
Robert A. Heinlein, The Moon is a Harsh Mistress
Gert Doering - Munich, Germany [email protected]...[Openvpn-devel] [PATCH applied] Re: Add noreturn attribute for MSVC to assert_failed method.
In reply to Arne SchwabeI can't claim to understand the MSVC intricacies, but the explanation is good, and it shouldn't break non-MSVC compiles. The dangling ";" after an #endif is truly OpenVPN-style ugly, though... we avoid it elsewhere by defining
#define __attribute__(x)
for MSVC builds, but error.h is special... the code would benefit from a comment, though.
Your patch has been applied to the master branch.
commit ad2140e0337f99c183e732b61df03ae29bdec766
Author: Arne Schwabe Date: Wed May 12 15:15:08 2021 +0200
Add noreturn attribute for MSVC to assert_failed method.
Signed-off-by: Arne Schwabe <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg22344.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
Re: [Openvpn-devel] [PATCH 9/9] Add detailed man page section to setup a OpenVPN setup with peer-fingerprint
In reply to Arne SchwabeQuoted 36 lines · Arne Schwabe
This is meant to give new users a quickstart for a useable OpenVPN setup. Our own documentation is lacking in this regard and many often tutorials that can be found online are often questionable in some aspects.
Linking the invidiaul RST file on github also give a tutorial in a nicely formatted way.
Signed-off-by Arne Schwabe <[email protected]...>--- Changes.rst | 4 + doc/Makefile.am | 1 + doc/man-sections/example-fingerprint.rst | 194 +++++++++++++++++++++++ 3 files changed, 199 insertions(+)create mode 100644
doc/man-sections/example-fingerprint.rstChanges.rst +4
-0@@ -25,6 +25,10 @@ Certificate pinning/verify peer fingerprint fingerprint of the peer. The option takes use a number of allowed SHA256 certificate fingerprints. + See the man page section "Small OpenVPN setup with peer-fingerprint" + for a tutorial how to use this feature. This is also available online + under https://github.com/openvpn/openvpn/blob/master/doc/man-sections/example-fingerprint.rst + TLS mode with self-signed certificates When ``--peer-fingerprint`` is used, the ``--ca`` and ``--capath`` option become optional. This allows for small OpenVPN setups without setting updoc/Makefile.am +0
-0
doc/Makefile.am dist_noinst_DATA = \ · line 28
Quoted 4 lines
doc/Makefile.am +1
-0@@ -25,6 +25,7 @@ dist_noinst_DATA = \ man-sections/connection-profiles.rst \ man-sections/encryption-options.rst \ man-sections/examples.rst \ + man-sections/examples.rst \
I suspect you intended to add doc/man-sections/example-fingerprint.rst instead of adding examples.rst twice.
To make this file appear in the openvpn(8) man page, you also need to include it from doc/openvpn.8.rst.
Maybe we should also consider moving all these configuration examples out of the main openvpn(8) man page and into a openvpn-examples(7) man page. This can be done after this change, though.
Signature · 4 lines
kind regards, David Sommerseth OpenVPN Inc
Re: [Openvpn-devel] [PATCH 9/9] Add detailed man page section to setup a OpenVPN setup with peer-fingerprint
Quoted 11 lines
doc/Makefile.am dist_noinst_DATA = \ · line 28
Quoted 7 lines
+++ b/doc/Makefile.am
doc/Makefile.am +1
-0@@ -25,6 +25,7 @@ dist_noinst_DATA = \ man-sections/connection-profiles.rst \ man-sections/encryption-options.rst \ man-sections/examples.rst \ + man-sections/examples.rst \I suspect you intended to add
doc/man-sections/example-fingerprint.rstinstead of addingexamples.rsttwice.
Quoted 8 lines
To make this file appear in the openvpn(8) man page, you also need to include it from
doc/openvpn.8.rst.Maybe we should also consider moving all these configuration examples out of the main openvpn(8) man page and into a openvpn-examples(7) man page. This can be done after this change, though.
We can also make that a patch before this patch in the patch set. However, I haven't looked at all the man page generation magic to understand how hard it would be to create an extra man page.
Arne
[Openvpn-devel] [PATCH applied] Re: Move utility function from win32.c to win32-util.c
In reply to Arne SchwabeLooks reasonable, no code changes, just moves.
Subjected this to a "make distcheck" on linux (new files...), and to an Ubuntu18/MinGW cross build. Both passed.
Your patch has been applied to the master branch.
commit 5a571fb0f68ce6961cddfa495af2cedf3ee0e216
Author: Arne Schwabe Date: Wed May 12 15:15:09 2021 +0200
Move utility function from win32.c to win32-util.c
Signed-off-by: Arne Schwabe <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg22348.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
[Openvpn-devel] [PATCH applied] Re: Document stub-v2 being basically an alias for no compression at all
In reply to Arne SchwabeDocumentation is good!
(The whole section could use a rewrite by a native speaker who understands OpenVPN compression subtleties...)
Your patch has been applied to the master branch.
commit 59f640c28d61fea1efff5b1386dcf1a08dd0aad7
Author: Arne Schwabe Date: Wed May 12 15:15:10 2021 +0200
Document stub-v2 being basically an alias for no compression at all
Signed-off-by: Arne Schwabe <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg22346.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
Re: [Openvpn-devel] [PATCH 9/9] Add detailed man page section to setup a OpenVPN setup with peer-fingerprint
In reply to Arne SchwabeQuoted 20 lines · Arne Schwabe
Quoted 11 lines
doc/Makefile.am dist_noinst_DATA = \ · line 28
Quoted 7 lines
+++ b/doc/Makefile.am
doc/Makefile.am +1
-0@@ -25,6 +25,7 @@ dist_noinst_DATA = \ man-sections/connection-profiles.rst \ man-sections/encryption-options.rst \ man-sections/examples.rst \ + man-sections/examples.rst \I suspect you intended to add
doc/man-sections/example-fingerprint.rstinstead of addingexamples.rsttwice.Quoted 8 lines
To make this file appear in the openvpn(8) man page, you also need to include it from
doc/openvpn.8.rst.Maybe we should also consider moving all these configuration examples out of the main openvpn(8) man page and into a openvpn-examples(7) man page. This can be done after this change, though.
Quoted 3 lines
We can also make that a patch before this patch in the patch set. However, I haven't looked at all the man page generation magic to understand how hard it would be to create an extra man page.
Most of the magic happens in openvpn.8.rst. We facilitate the ..include:: statement to "glue" together the main man page from all the files in man-sections/. And this is all parsed and handled by rst2man and rst2html.
The Makefile.am ensures the openvpn.8 and openvpn.8.html are properly built when it should. We're doing a little trick with a dist-hook, so these files are prebuilt and packaged when running 'make dist' and 'make distcheck', which ensures prebuilt man page files (groff and html) are packaged into the source tarball. And these files are normally not rebuilt unless missing.
In Makefile.am it could be created some more generic %.8 and %.8.html rules, also for the man 7 page section. And then the main framework should be in in place.
A nice touch could be though to extract the ..include:: statements from the .rst files we're building to generate the file list for dist_noinst_DATA automatically, as I consider this the most fragile aspect. It could probably also be done the other way too (Makefile.am generating an .rst include file before the main rst2{html,man} run), but I consider this less preferred as then the order of section is defined inside Makefile.am and not a document file itself.
Signature · 4 lines
kind regards, David Sommerseth OpenVPN Inc
Re: [Openvpn-devel] [PATCH 9/9] Add detailed man page section to setup a OpenVPN setup with peer-fingerprint
In reply to Arne Schwabe-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi,
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Quoted 5 lines · Arne Schwabe
This is meant to give new users a quickstart for a useable OpenVPN setup. Our own documentation is lacking in this regard and many often tutorials that can be found online are often questionable in some aspects.
I believe Openvpn in standard mode (Full PKI) would reject an expired client certificate.
Note: There is absolutely nothing in the manual to confirm this !
https://build.openvpn.net/man/openvpn-2.5/openvpn.8.html
On that page there are eight uses of the word 'expire' and they all relate to an expired auth-token, this could also probably be improved.
However, Openvpn in peer-fingerprint mode allows an expired client certificate to connect.
The client log *does* have a 'WARNING: Your certificate has expired!' The server log has nothing about an expired client certificate. And, as we all know, _who reads their log files_ anyway ?
The issue here is that the server allows an expired client certificate to connect and there is no mention of this change in behaviour.
Thanks
R
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail
wsBzBAEBCAAGBQJgoqTPACEJEE+XnPZrkLidFiEECbw9RGejjXJ5xVVVT5ec 9muQuJ18DQgAiFbKtIV3YXi4YG3qiN429AsLyGd8FR+ysy09aNB/FM9p/70E FgobM0x2waAWILLaNOgG/u3B8ocHa6ld0s2h0fJ7ef7FAdo4SRYbosyQFq+Q gcv5Z8AzivkOVbK2d9kP9T9HWd4BVOtduHKg/u/pwwQD7GUB4mM9HrztTzy8 X+oG6197ZZnA9jLUE+wxShttgXf1PP9q39r7gJ798kt1P0zDrtN4gjSTLp5v JwdyxMLHnD5YdwqsW31Zu3AnYP+s12xXfq8dZtAP0JaY/qYt/FqU6t+3hNOB PLtXCdmr53wPdrkyUOHnzLcOoF2S3M9pDLZW1/JSowginVfUpRpUWQ== =kmta
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 9/9] Add detailed man page section to setup a OpenVPN setup with peer-fingerprint
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi,
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Quoted 9 lines · tincantech via Openvpn-devel
Hi,
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Quoted 4 lines · On Wednesday, 12 May 2021 14:15, Arne Schwabe [email protected]... wrote:
This is meant to give new users a quickstart for a useable OpenVPN setup. Our own documentation is lacking in this regard and many often tutorials that can be found online are often questionable in some aspects.
I think it is also worth noting that, in it's current form, the documentation given does not provide for a --remote-cert-tls solution.
I may be able to help with that but prefer to log it here first.
Thanks
R
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail
wsBzBAEBCAAGBQJgor7wACEJEE+XnPZrkLidFiEECbw9RGejjXJ5xVVVT5ec 9muQuJ3g5wf9EXijgq5+j38umqKpdwIeQQ1F78OeEPMi8/LAxyrGZlSJNvr+ 9OIDwj9ZBE1SOY80f2AGR5tXE7Czl1VT0S+CPcrVnaKadR5dfNB3HpVShOWY sFPvmjzY++U0Jmw6/vsV09SCigBv85DU2s+VYmwoBwgq08vc28WvKXPY6DJl PxmePhpVbsV/5uZAw+3MismpvPvw7hzDmEEKtZLeqduLFGx9l0D7Apeq+d1Q 4348BdmeZFaIjk6sKBW45akIjxeLN3wejfp0hUFBYrITVs8ssQUbQUc9uDDu CdUxMwoeu5ZhVT7TN5Rh2iSjkFQjjsewTimGLuNr4dT+dUH3ypJvsQ== =ql9l
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 9/9] Add detailed man page section to setup a OpenVPN setup with peer-fingerprint
In reply to tincantechAm 17.05.21 um 19:16 schrieb tincantech:
Quoted 22 lines
Hi,
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Quoted 4 lines · Arne Schwabe
This is meant to give new users a quickstart for a useable OpenVPN setup. Our own documentation is lacking in this regard and many often tutorials that can be found online are often questionable in some aspects.
I believe Openvpn in standard mode (Full PKI) would reject an expired client certificate.
Note: There is absolutely nothing in the manual to confirm this !
https://build.openvpn.net/man/openvpn-2.5/openvpn.8.html
On that page there are eight uses of the word 'expire' and they all relate to an expired auth-token, this could also probably be improved.However, Openvpn in peer-fingerprint mode allows an expired client certificate to connect.
Quoted 6 lines
The client log *does* have a 'WARNING: Your certificate has expired!' The server log has nothing about an expired client certificate. And, as we all know,
_whoreads their logfiles_anyway ?The issue here is that the server allows an expired client certificate to connect and there is no mention of this change in behaviour.
Yes. We just trust the fingerprint of the certificate. The behaviour to ignore expiry is a side effect of that. It is kinda designed to be this way.
Arne
Re: [Openvpn-devel] [PATCH 9/9] Add detailed man page section to setup a OpenVPN setup with peer-fingerprint
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi,
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Quoted 25 lines · Arne Schwabe
Am 17.05.21 um 19:16 schrieb tincantech:
Quoted 9 lines
Hi,
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐Quoted 4 lines · On Wednesday, 12 May 2021 14:15, Arne Schwabe [email protected]... wrote:
This is meant to give new users a quickstart for a useable OpenVPN setup. Our own documentation is lacking in this regard and many often tutorials that can be found online are often questionable in some aspects.
Quoted 13 lines
I believe Openvpn in standard mode (Full PKI) would reject an expired client certificate.
Note: There is absolutely nothing in the manual to confirm this !
https://build.openvpn.net/man/openvpn-2.5/openvpn.8.html
On that page there are eight uses of the word 'expire' and they all relate to an expired auth-token, this could also probably be improved. However, Openvpn in peer-fingerprint mode allows an expired client certificate to connect.
The client log does have a 'WARNING: Your certificate has expired!' The server log has nothing about an expired client certificate. And, as we all know, who reads their log files anyway ?
The issue here is that the server allows an expired client certificate to connect and there is no mention of this change in behaviour.
Quoted 4 lines
Yes. We just trust the fingerprint of the certificate. The behaviour to ignore expiry is a side effect of that. It is kinda designed to be this way.
Arne
The change itself is ok, I just thought it worth mentioning is this guide.
Thanks
R
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail
wsBzBAEBCAAGBQJgo76EACEJEE+XnPZrkLidFiEECbw9RGejjXJ5xVVVT5ec 9muQuJ1pAAf+M7BWGoMLjSdhrcfokV0mu9M8eND0XF7AvEI3d+DQEGqJ2S9I l6aVCCXsIKi1m/fJbYSYROhD7zvKj3i1KQebXxUTTonmlhEIMLhXnzHmdAPH Owh3Ixpf284NMTcjZgcQAhGcLdlMeVpykJrIIx4lpR75u0+FV6STUmtIgG2Q gWOi4OduA5gNJanu4BlF/7JCHNXSQvHQ5yrSGBrRdT2kIIGnrHSYfmUz1Jq4 v0AHQP8aTFD6sUaYw2j0nRGKj43rAmV+yyx2oLU1/6jbiBl5wq25fgNi3cCa 22HuxRP1SsbSf5PoWbUyZmXagpnHKRmgj42DkMn3pMTLjGnDD6NmVA== =Fotu
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 9/9] Add detailed man page section to setup a OpenVPN setup with peer-fingerprint
In reply to tincantech-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi,
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Quoted 14 lines · tincantech
Hi,
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Quoted 8 lines · On Monday, 17 May 2021 18:16, tincantech via Openvpn-devel…
Hi,
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐Quoted 4 lines · On Wednesday, 12 May 2021 14:15, Arne Schwabe [email protected]... wrote:
This is meant to give new users a quickstart for a useable OpenVPN setup. Our own documentation is lacking in this regard and many often tutorials that can be found online are often questionable in some aspects.
Quoted 5 lines
I think it is also worth noting that, in it's current form, the documentation given does not provide for a --remote-cert-tls solution.
I may be able to help with that but prefer to log it here first.
If/how you choose to document this here, I leave that to you.
I have expanded easypfp to create either Server or Client certificates by adding X509v3 Extended Key Usage: TLS Web Client Authentication and TLS Web Server Authentication as optional extras. All tests passed.
https://github.com/TinCanTech/easy-pfp
Thanks
R
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail
wsBzBAEBCAAGBQJgpAgIACEJEE+XnPZrkLidFiEECbw9RGejjXJ5xVVVT5ec 9muQuJ2goggAsxXM0nhW/aKCPi5ZiAgn4ZwSXwDuCQRU/G5Ff57RKfdiPjim ZWyWtttrUBlyBNRKUzKVoMbiAdXuf8WIUIgx11SqG0ZrJEbzvyhN6rcsCX33 6c6C2EPFriFwtMDjyiBiS4OtxKVs/L/GpbjfbxU6oPvQfQLVs/licvPOOHGs xAFXMOF8COPvcANstUUFzr9BTq7kc6KUzaI01zrBkDAh7zRapHupo6wiPrjB xRuhWnwV8dGxaeDNoxB7VXAqbWaPQFCsxc+gt9wPlFcG28Y0Ct1ME1MIIKKc +w6+wzEgGq01OTKFIzKJ6CVjIVUTziHZ65nsmHd/JqXOWZ146ZXJ5w== =+xAi
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 9/9] Add detailed man page section to setup a OpenVPN setup with peer-fingerprint
In reply to tincantechQuoted 3 lines
I just want this to be verified because the manual reads that:
udp6 will force only udp on IPv6, at least that is how I read it.
Not on the server side. It is one of the quirks that we need to fix at some point. See the ipv6only option of --bind for more details
Quoted 14 lines
doc/man-sections/example-fingerprint.rst line 57
Quoted 10 lines
doc/man-sections/example-fingerprint.rst new file +9
-0+ + # The ip address the server will distribute + server 192.168.234.0 255.255.255.0 + server-ipv6 fd00:6f76:706e::/64 + + # A tun-mtu of 1400 avoids problems of too big packets after VPN encapsulation + tun-mtu 1400 + + # The fingerprints of your clients. After adding/remvoing one here restart theremvoing -> removing
Quoted 11 lines
doc/man-sections/example-fingerprint.rst line 66
Quoted 9 lines
doc/man-sections/example-fingerprint.rst new file +9
-0+ # server + <peer-fingerprint> + </peer-fingerprint> + + # Notify clients when you restart the server to reconnect quickly + explicit-exit-notify 1 + + # Ping every 60s, restart if no data received for 5 minutes + keepalive 60 300I presume you are all sure that this is suitable for consumer grade routers.
I think 60 300 is a good starting point but we might later modify it if this becomes a problem.
Thanks for spell/grammar checking it!
Arne
Re: [Openvpn-devel] [PATCH 9/9] Add detailed man page section to setup a OpenVPN setup with peer-fingerprint
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi,
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Quoted 5 lines · Arne Schwabe
Quoted 2 lines
I just want this to be verified because the manual reads that:
udp6 will force only udp on IPv6, at least that is how I read it.Not on the server side. It is one of the quirks that we need to fix at some point. See the ipv6only option of --bind for more details
I actually checked this and believe it is a reasoanble decision. It works for me and I was not expecting it to do so.
Quoted 37 lines
Quoted 37 lines
Quoted 9 lines
(quoted diff) +0
-4- - The ip address the server will distribute ========================================== - server 192.168.234.0 255.255.255.0 - server-ipv6 fd00:6f76:706e::/64Review
Quoted 10 lines
(quoted diff) +0
-5- - A tun-mtu of 1400 avoids problems of too big packets after VPN encapsulation ============================================================================= - tun-mtu 1400 - - The fingerprints of your clients. After adding/remvoing one here restart the =============================================================================remvoing -> removing
Quoted 15 lines
(quoted diff) +0
-8- server ======= - <peer-fingerprint> - </peer-fingerprint> - - Notify clients when you restart the server to reconnect quickly ================================================================ - explicit-exit-notify 1 - - Ping every 60s, restart if no data received for 5 minutes
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
==========================================================- keepalive 60 300
I presume you are all sure that this is suitable for consumer grade routers.
I think 60 300 is a good starting point but we might later modify it if this becomes a problem.
OK.
It is a big difference from the standard setting so I just wanted to call it here.
Quoted 4 lines
Thanks for spell/grammar checking it!
Arne
No problem. Thanks for everything you've done too.
Richard
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail
wsBzBAEBCAAGBQJgpaUbACEJEE+XnPZrkLidFiEECbw9RGejjXJ5xVVVT5ec 9muQuJ1iEQf9HSb9ReZSAve3LfzgDNo4hb0c1mGNWSNcIQudw8fdaYc8TfjU UD1MLdTM9CM5uuHEz3O29nyBPEjCUJS16bQ45lVtHzAbGcdzUEF9cn/gUsST 7v/3aMeFM76YSDXnI3DrA6PtlqXoWJ7K+NC3tzXb7suF3Zy0Gi8AWgJhKD8q tXvHtXdGD9ohsZTF4yio8PWCW4n0UFPUTImndr/R8D6TRO5umhBDkmQ9fWx0 3gPN6ln9FF2bE/gqG7Sj1s6uu5OLNqJ+aswet2B22DI/7CHlgQzFC38nuy5f CKFJ0eZnrQ8baDDOpOHlmLTarisRLcOP7rxT1qz5S6PWdGTP4+s/rg== =VNul
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 9/9] Add detailed man page section to setup a OpenVPN setup with peer-fingerprint
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi,
just FYI
I was also going to question the --tun-mtu 1400 setting but decided that was above my pay-grade. I think it is probably a good long-term decision that will probably invade some of those less respectable blogs and be a good thing over-all. I know, it is complicated !
Cheers
R
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail
wsBzBAEBCAAGBQJgpamaACEJEE+XnPZrkLidFiEECbw9RGejjXJ5xVVVT5ec 9muQuJ3PVQgAju8gPugglio2RQ1Qr/fcXFyq7tAQEy/njizNTIDBEAE3E1tr J0gOsMMe1fQTDjen5DCtJEyq7pwIgMVKWw/kVP7DzOlTzC+oUb4avysoi3Ld pUFDmJdD2eP1Ls+Ylc9O2HDlK1q8n46mUjX5Fuv1+0UN/HFUb1d7z9IgRHTf 0h+6f7dkn4z0QgFjY97esSKDu9x3ZZhhIfUPwPOUF4mLEQv+6PczpzAvm7eS oZRr/GNjSBq1dBzzWNi80v9cv31Uxz7VTuy3ntKp5k0n80W0b93tbG0xVcu7 qi1ZCQh5VgFdh/35+7uwsJkpA9Eoc+ijFqV1+gz1+FekdRAmO1iCpA== =rh5B
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 9/9] Add detailed man page section to setup a OpenVPN setup with peer-fingerprint
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi,
missed another one ..
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Quoted 9 lines · tincantech
Hi,
just FYI
I was also going to question the --tun-mtu 1400 setting but decided that was above my pay-grade. I think it is probably a good long-term decision that will probably invade some of those less respectable blogs and be a good thing over-all. I know, it is complicated !
How would that effect the default --mssfix ?
Swings and roundabouts
R
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail
wsBzBAEBCAAGBQJgpa+8ACEJEE+XnPZrkLidFiEECbw9RGejjXJ5xVVVT5ec 9muQuJ1f9Af/ZxK/IusDe82uZsnlZXlRAJElzyamWPA+Splu+nOoUVQhSjah eyc6YqM4+FNNP6dyZxVELT0RKC5p8c7KUEqFzay+2nflnwALDu9m5ak4WVyb EFmXPFctfu1myCdqZ70705DhfORainxI7tLrbzTwLMeZMH1xPJ9IszBE5wqb nUcBO1B3g+E01b/cF9GL6wHF32kW9BH5uc+0A1mb4/3+iO83VP3nUnKBm+sj pZUR4G3VpgLzyc1ymIkxQIxsas1f6M3r8qvBI+ol1F1YkZJXy76Piuh7I5rF 0fYcm0jtxKmf/ETHPIQFL6J3N2zrar8+kazS0GRW9hPLPfqODXqqDQ== =I3MI
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 8/9] Document stub-v2 being basically an alias for no compression at all
In reply to Arne Schwabe-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi
text corrections.
Sorry about protonmail making '+' to '-'
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Quoted 20 lines · Arne Schwabe
Signed-off-by Arne Schwabe [email protected]...
doc/man-sections/protocol-options.rst| 5 +++++1 file changed, 5 insertions(+)doc/man-sections/protocol-options.rst +0
-0index
4b6928c68..34d4255ee100644---
a/doc/man-sections/protocol-options.rst+++
b/doc/man-sections/protocol-options.rstdoc/man-sections/protocol-options.rst +0
-0@@ -96,6 +96,11 @@ configured in a compatible way between both the local and remote side.other variants always add one extra framing byte compared to no
compression framing.
doc/man-sections/protocol-options.rst
Quoted 5 lines
doc/man-sections/protocol-options.rst +0
-5- Especially :code:`stub-v2` is essentially identical to no compression and - no compression framing as its header indicates IP version 5 in a tun setup - and can (ab)used to complete disable compression to clients. (See the - :code:`migrate option below) - If the `algorithm` parameter is :code:`stub`, :code:`stub-v2` or empty,
Re-write:
The :code:stub-v2 is essentially identical to no compression and no compression framing as its header indicates IP version 5 in a tun setup and can be (ab)used to completely disable compression to clients. (See the :code:migrate option below)
If the algorithm parameter is :code:stub, :code:stub-v2 or empty,
Quoted 7 lines
compression will be turned off, but the packet framing for compression
will still be enabled, allowing a different setting to be pushed later.
--
Quoted 8 lines
2.31.1
Openvpn-devel mailing list
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail
wsBzBAEBCAAGBQJgz4RlACEJEE+XnPZrkLidFiEECbw9RGejjXJ5xVVVT5ec 9muQuJ17fgf/SKzw7gpopswKR35nFGEW9F2hR7FMgKX7xBkhWLLUlENrD/Eq LvQ39Y7+CK0+19MIJHed4hgSaBx4MK3Eb28XHMsm6y9Vz8lfM9/IeXsS3uXy Ip9nCy4EpzPc62FWb93ysXyXRNS8GkYvZX50Oh3xV7glZMEwA5q7UGhRLsJY 3orWsnpT0PUTjrwB4Nm8ZDprXUEU1tsefTJn/HnbOzwlrCAa+b/W3xP8F7wn YO4+bU3XP137bEV7t0FaB0qpTKXB2X+5j+A46T3jVjLOjHKSQipqgqSY0j5j TJvwi5mjw0zaWCkFKBlrhp2f4Ybztd6OSB/JguxLE+jPkkWvEoRV2Q== =ms4h
-----END PGP SIGNATURE-----
Re: [Openvpn-devel] [PATCH 8/9] Document stub-v2 being basically an alias for no compression at all
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Ignore me .. this has been applied
Sent with ProtonMail Secure Email.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Quoted 40 lines · tincantech via Openvpn-devel
Hi
text corrections.
Sorry about protonmail making '+' to '-'
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Quoted 20 lines · On Wednesday, May 12th, 2021 at 14:15, Arne Schwabe [email protected]... wrote:
Signed-off-by Arne Schwabe [email protected]...
doc/man-sections/protocol-options.rst| 5 +++++1 file changed, 5 insertions(+)doc/man-sections/protocol-options.rst +0
-0index
4b6928c68..34d4255ee100644---
a/doc/man-sections/protocol-options.rst+++
b/doc/man-sections/protocol-options.rstdoc/man-sections/protocol-options.rst +0
-0@@ -96,6 +96,11 @@ configured in a compatible way between both the local and remote side.other variants always add one extra framing byte compared to no
compression framing.
doc/man-sections/protocol-options.rst
Quoted 5 lines
doc/man-sections/protocol-options.rst +0
-5- Especially :code:`stub-v2` is essentially identical to no compression and - no compression framing as its header indicates IP version 5 in a tun setup - and can (ab)used to complete disable compression to clients. (See the - :code:`migrate option below) - If the `algorithm` parameter is :code:`stub`, :code:`stub-v2` or empty,Re-write:
The :code:
stub-v2is essentially identical to no compression and
Quoted 22 lines
no compression framing as its header indicates IP version 5 in a tun setup
and can be (ab)used to completely disable compression to clients. (See the
:code:
migrateoption below)If the
algorithmparameter is :code:stub, :code:stub-v2or empty,Quoted 14 lines
compression will be turned off, but the packet framing for compression
will still be enabled, allowing a different setting to be pushed later.
--
2.31.1
Openvpn-devel mailing list
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail
wsBzBAEBCAAGBQJgz4cFACEJEE+XnPZrkLidFiEECbw9RGejjXJ5xVVVT5ec 9muQuJ3SOwgAmIYtimEns1a2LT4CwKUU3lfhXEr2IHvNCZGbTl56p7FYgsVe L3my1KclB/z6NVPydgBs/FAowSPOnWWoaWuh/+eMo1O8+nfA7+5YhNTL6Hyn pRKJDJ6trAWXlGQm8N1kzRKUCjrDkPzFKoKsQvXgmjypQeyfwVLL4gJ+XQFk gsP3gve88tb/q8F5FJfPcuM2NrNsLN0c+f4CKlfb6sr/U7ALp7Rf00hQ71CV 28RSZir15r+aahRmJs6SWng0K5gpN50Ed9PICBYQNmsQSqVAg6f2n1OA3ACQ C68i58Vv85ElzG2VRymSzWAHdzA/KFM3qaKCnEZyviTkB00rbgWm0g== =1Bdk
-----END PGP SIGNATURE-----