Enhancements.
Currently when a server's IP pool has no free address it reports a auth failure to the client. Can this be changed to report no free addresses? And will remote-random allow the client to continue past this error? Also can there be reporting added for the server side to show what version the client is connecting with?
Thanks,
Brad
This email may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.
Quoted 7 lines · Brad Dameron
Also can there be reporting added for the server side to show what version the client is connecting with?
I agree. I have previously asked for client version and OS to be "pushed" during the initial phase so that the server can be decisions based on it. Currently we have some NAC checks built into the initial connection phase (thanks to openvpn's great scripting options) and we have to use portscans to differentiate between Windows and Unix. I'd rather the client just told me so that we could be finer grained in our reactions without resorting to such methods.
Signature · 6 lines
Cheers Jason Haar Information Security Manager, Trimble Navigation Ltd. Phone: +64 3 9635 377 Fax: +64 3 9635 417 PGP Fingerprint: 7A2E 0407 C9A6 CAF6 2B9F 8422 C063 5EBB FE1D 66D1
Hi,
Quoted 7 lines · Jason Haar
Quoted 2 lines · Brad Dameron
Also can there be reporting added for the server side to show what version the client is connecting with?
I agree. I have previously asked for client version and OS to be "pushed" during the initial phase so that the server can be decisions based on it.
As far as I understand the code (check_incoming_control_channel_dowork() in forward.c) this should be doable without breaking compatibility to older servers - new control messages can be added, and a server that does not understand them will just log a warning:
...
if (buf_string_match_head_str (&buf, "AUTH_FAILED"))
receive_auth_failed (c, &buf);
else if (buf_string_match_head_str (&buf, "PUSH_"))
incoming_push_message (c, &buf);
else if (buf_string_match_head_str (&buf, "RESTART"))
server_pushed_restart (c, &buf);
else
msg (D_PUSH_ERRORS, "WARNING: Received unknown control message: %s",BSTR (&buf));
So...
- someone needs to specify the control message
- someone needs to implement sending it on the client side
- someone needs to think about the planned-usage on the server side (present at management interface? put into environment for scripts/ plugins? if yes, structured environment variables or just one big "lump" with whatever the client puts in there?)
- someone needs to implement parsing the control message on the server side and distribute the resulting information to server-side config structures and to plugins/scripts
- someone else needs to review and ACK.
I'm fairly busy with the IPv6 stuff (and with earning a living), so I won't implement this, but I'm happy to help with it - bounce ideas around, discuss in #openvpn-devel on irc.freenode.net, etc.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Hi,
Quoted 28 lines · Gert Doering
Hi,
Quoted 9 lines · Jason Haar
Quoted 3 lines · Brad Dameron
Also can there be reporting added for the server side to show what version the client is connecting with?
I agree. I have previously asked for client version and OS to be "pushed" during the initial phase so that the server can be decisions based on it.
As far as I understand the code (
check_incoming_control_channel_dowork()inforward.c) this should be doable without breaking compatibility to older servers - new control messages can be added, and a server that does not understand them will just log a warning:...
if (buf_string_match_head_str (&buf, "AUTH_FAILED")) receive_auth_failed (c, &buf); else if (buf_string_match_head_str (&buf, "PUSH_")) incoming_push_message (c, &buf); else if (buf_string_match_head_str (&buf, "RESTART")) server_pushed_restart (c, &buf); else msg (D_PUSH_ERRORS, "WARNING: Received unknown control message: %s",
Quoted 4 lines
BSTR (&buf));
is the control message stage early enough? that means authentication has been completed, and the client_connect script has been run (or am I mistaken? please correct me if I am wrong). I could foresee that an administrator wants to specify a different client_connect script depending on the client version, or that an administrator wants to not even allow access by older clients (e.g. at the tls-verify level)
JM2CW,
JJK
Quoted 26 lines
So...
- someone needs to specify the control message
- someone needs to implement sending it on the client side
- someone needs to think about the planned-usage on the server side (present at management interface? put into environment for
scripts/plugins? if yes, structured environment variables or just one big "lump" with whatever the client puts in there?)- someone needs to implement parsing the control message on the server side and distribute the resulting information to server-side config structures and to plugins/scripts
- someone else needs to review and ACK.
I'm fairly busy with the IPv6 stuff (and with earning a living), so I won't
implement this, but I'm happy to help with it - bounce ideas around, discuss in #openvpn-devel on irc.freenode.net, etc.gert
------------------------------------------------------------------------
Hi,
Quoted 11 lines · Jan Just Keijser
Quoted 10 lines
if (buf_string_match_head_str (&buf, "AUTH_FAILED")) receive_auth_failed (c, &buf); else if (buf_string_match_head_str (&buf, "PUSH_")) incoming_push_message (c, &buf); else if (buf_string_match_head_str (&buf, "RESTART")) server_pushed_restart (c, &buf); else msg (D_PUSH_ERRORS, "WARNING: Received unknown control message: %s",BSTR (&buf));
Quoted 3 lines
is the control message stage early enough? that means authentication has been completed, and the
client_connectscript has been run (or am I mistaken?
I'm not absolutely sure at what time these messages can be sent. But most likely you're right, you want this before running client-connect.
Someone around who fully understands the session flow...?
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 14 lines · Gert Doering
Hi,
Quoted 11 lines · Jan Just Keijser
Quoted 10 lines
if (buf_string_match_head_str (&buf, "AUTH_FAILED")) receive_auth_failed (c, &buf); else if (buf_string_match_head_str (&buf, "PUSH_")) incoming_push_message (c, &buf); else if (buf_string_match_head_str (&buf, "RESTART")) server_pushed_restart (c, &buf); else msg (D_PUSH_ERRORS, "WARNING: Received unknown control message: %s",BSTR (&buf));
Quoted 9 lines
Quoted 3 lines
is the control message stage early enough? that means authentication has been completed, and the
client_connectscript has been run (or am I mistaken?I'm not absolutely sure at what time these messages can be sent. But most likely you're right, you want this before running client-connect.
Someone around who fully understands the session flow...?
Taken completely from memory, the PUSH_REQ phase comes in _after_ the authentication process. But, I also believe it comes after OPENVPN_PLUGIN_CLIENT_CONNECT phase, as that plug-in hook can push config settings to the client dynamically. And of the OPENVPN_PLUGIN_CLIENT_CONNECT hook sends a rejection, the connection is dropped.
Unless somebody else chimes in before I've been able to double check it, I'll do some more checks here.
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAkyPeboACgkQDC186MBRfrrl2wCgqL7uNdJaj2N9nZykQ+rUoo7v Zp0An3c5ICN6Tokyvr7hIrkOYrgsv10R
=CX8v
-----END PGP SIGNATURE-----
Yo all,
Quoted 36 lines · David Sommerseth
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 15 lines · Gert Doering
Hi,
Quoted 11 lines · Jan Just Keijser
Quoted 11 lines
if (buf_string_match_head_str (&buf, "AUTH_FAILED")) receive_auth_failed (c, &buf); else if (buf_string_match_head_str (&buf, "PUSH_")) incoming_push_message (c, &buf); else if (buf_string_match_head_str (&buf, "RESTART")) server_pushed_restart (c, &buf); else msg (D_PUSH_ERRORS, "WARNING: Received unknown control message: %s",BSTR (&buf));
Quoted 8 lines
Quoted 2 lines
is the control message stage early enough? that means authentication has been completed, and the
client_connectscript has been run (or am I mistaken?I'm not absolutely sure at what time these messages can be sent. But most likely you're right, you want this before running client-connect.
Someone around who fully understands the session flow...?
Taken completely from memory, the
PUSH_REQphase comes in _after_ the authentication process. But, I also believe it comes afterOPENVPN_PLUGIN_CLIENT_CONNECTphase, as that plug-in hook can push config settings to the client dynamically. And of theOPENVPN_PLUGIN_CLIENT_CONNECThook sends a rejection, the connection is dropped.
Quoted 5 lines
Unless somebody else chimes in before I've been able to double check it, I'll do some more checks here.
I was just browsing through the 2.1.3 source tree and found this in ssl.c:
3379 static bool
3380 push_peer_info(struct buffer *buf, struct tls_session *session) 3381 {
3382 struct gc_arena gc = gc_new ();
3383 bool ret = false;
3384
3385 #ifdef ENABLE_PUSH_PEER_INFO
3386 if (session->opt->push_peer_info) /* write peer info */
3387 {
3388 struct env_set *es = session->opt->es; 3389 struct env_item *e; 3390 struct buffer out = alloc_buf_gc (512*3, &gc);
3391
3392 /* push version */
3393 buf_printf (&out, "IV_VER=%s\n", PACKAGE_VERSION);
3394
3395 /* push platform */
3396 #if defined(TARGET_LINUX)
3397 buf_printf (&out, "IV_PLAT=linux\n");
3398 #elif defined(TARGET_SOLARIS)
this gets called if --push-peer-info is specified . This seems to be new for 2.1.3 - has anyone tested it?
cheers,
JJK
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 1 line · Jan Just Keijser
Yo all,
[...snip...]
Quoted 24 lines
I was just browsing through the 2.1.3 source tree and found this in
ssl.c:3379 static bool
3380push_peer_info(struct buffer *buf, struct tls_session *session)3381 {
3382 structgc_arenagc =gc_new();
3383 bool ret = false;
3384
3385 #ifdefENABLE_PUSH_PEER_INFO
3386 if (session->opt->push_peer_info) /* write peer info */
3387 {3388 struct env_set *es = session->opt->es; 3389 struct env_item *e; 3390 struct buffer out = alloc_buf_gc (512*3, &gc);3391
3392 /* push version */
3393buf_printf(&out, "IV_VER=%s\n",PACKAGE_VERSION);
3394
3395 /* push platform */
3396 #ifdefined(TARGET_LINUX)
3397buf_printf(&out, "IV_PLAT=linux\n");
3398 #elifdefined(TARGET_SOLARIS)
Quoted 2 lines
this gets called if --push-peer-info is specified . This seems to be new for 2.1.3 - has anyone tested it?
Good catch ... this is the commit which introduces it. (SVN r5668) You're right, this is in 2.1.2/2.1.3
commit aaf72974672e4f2af2053247b63ef6f06bdc80c0
Author: James Yonan <[email protected]...> Date: Tue Jun 1 07:12:27 2010 +0000
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/[email protected]...
e7ae566f-a301-0410-adde-c780ea21d3b5
<sarcastic>
And according to our normal procedure, this is of course not documented in the man page.
</sarcastic>
Thanks, JJK for catching this! I don't think many have tested it - except James. So if you wouldn't mind testing it out and maybe shed some knowledge about it, that would be great!
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAkycWacACgkQDC186MBRfrrFyACfcv0yz0Y+PuiuN5yKtU7rFIOy xcoAni3AdaQuYG2S7aWK1yni1JwKMahA
=tr7E
-----END PGP SIGNATURE-----
Hi David,
Quoted 54 lines · David Sommerseth
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 2 lines · Jan Just Keijser
Yo all,
[...snip...]
Quoted 24 lines
I was just browsing through the 2.1.3 source tree and found this in
ssl.c:3379 static bool
3380push_peer_info(struct buffer *buf, struct tls_session *session)3381 {
3382 structgc_arenagc =gc_new();
3383 bool ret = false;
3384
3385 #ifdefENABLE_PUSH_PEER_INFO
3386 if (session->opt->push_peer_info) /* write peer info */
3387 {3388 struct env_set *es = session->opt->es; 3389 struct env_item *e; 3390 struct buffer out = alloc_buf_gc (512*3, &gc);3391
3392 /* push version */
3393buf_printf(&out, "IV_VER=%s\n",PACKAGE_VERSION);
3394
3395 /* push platform */
3396 #ifdefined(TARGET_LINUX)
3397buf_printf(&out, "IV_PLAT=linux\n");
3398 #elifdefined(TARGET_SOLARIS)Quoted 3 lines
this gets called if --push-peer-info is specified . This seems to be new for 2.1.3 - has anyone tested it?
Good catch ... this is the commit which introduces it. (SVN r5668) You're right, this is in 2.1.2/2.1.3
commit
aaf72974672e4f2af2053247b63ef6f06bdc80c0Author: James Yonan <[email protected]...> Date: Tue Jun 1 07:12:27 2010 +0000Implemented a key/value auth channel from client to server. Version 2.1.1i git-svn-id:http://svn.openvpn.net/projects/openvpn/branches/BETA21/[email protected]...
e7ae566f-a301-0410-adde-c780ea21d3b5
Quoted 9 lines
<sarcastic>
And according to our normal procedure, this is of course not documented in the man page.
</sarcastic>Thanks, JJK for catching this! I don't think many have tested it - except James. So if you wouldn't mind testing it out and maybe shed some knowledge about it, that would be great!
just toyed with it for about an hour or so and I can't get it to work - I even ran
openvpn --cipher none --auth none
to see if I could see the IV_ and UV_ variables fly over the wire and I don't even see that.
Looks like this is still under development, but it is a nice starting point for implementing this enhancement (I'd go for a full negotiation step).
share and enjoy,
JJK
Hi,
Quoted 1 line · Jan Just Keijser
Quoted 1 line
Quoted 1 line
3385 #ifdef
ENABLE_PUSH_PEER_INFO
[..]
Quoted 5 lines
just toyed with it for about an hour or so and I can't get it to work - I even ran
openvpn --cipher none --auth none
to see if I could see theIV_andUV_variables fly over the wire and I don't even see that.
Are you sure it has been compiled in? The code block is #ifdef'ed...
(Yes, this sounds like a dumb question, but sometimes we overlook the obvious)
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Quoted 13 lines · Gert Doering
Hi,
Quoted 2 lines · Jan Just Keijser
Quoted 2 lines
Quoted 2 lines
3385 #ifdef
ENABLE_PUSH_PEER_INFO[..]
Quoted 4 lines
just toyed with it for about an hour or so and I can't get it to work - I even ran
openvpn --cipher none --auth none
to see if I could see theIV_andUV_variables fly over the wire and I don't even see that.
Quoted 5 lines
Are you sure it has been compiled in? The code block is #ifdef'ed...
(Yes, this sounds like a dumb question, but sometimes we overlook the obvious)
OK, just toyed with it a little bit more:
- yes the code is compiled in (there's a #define in syshead.h)
- yes the IV_ lines are sent over the wire if you specify --push-peer-info
- but no the server never does anything with it (in key_method_2_read the buffer is emptied out after reading the username and password; the IV_/UV_ part comes after that)
so it definitely looks like a "work in progress" ...
cheers,
JJK