why doesn't openvpn negotiate settings?
Quoted 8 lines · Gert Doering
Hi,
Quoted 3 lines · Ralf Hildebrandt
I was wondering about this as well. This makes it extremely hard to every change the cipher (i.e. if it's not considered "safe" anymore)
Quoted 7 lines
It needs to be implemented, tested, etc. - and I'm not sure right now whether it can be done at all without changing the openvpn protocol in an incompatible way. It might work, it might not.
JJK might know more whether it can be done at all...
I'm CC'ing in the openvpn-devel list as I hope that some on that list can comment :)
It should be possible to add negotiation without completely breaking backwards compatibility; right now, when a server pushes an option to the client that is unrecognized the client will print a warning but it will not abort. This could be used to push a 'negotation request' - if the client responds then a negotation phase can start , during which the encryption key, hashing cipher, MTU settings etc can be negotiated. If the client does not respond the server would need to assume that it's a 2.3 or older client.
This is quite an extensive change however, especially as the client needs to send back information (similar to the PUSH_PEER_INFO stuff).
If someone knows of a better way to add a negotiation phase (esp BEFORE the push/pull phase has started) without breaking older clients then I'd be happy to hear about it.
cheers,
JJK
Hi,
Quoted 8 lines · Jan Just Keijser
It should be possible to add negotiation without completely breaking backwards compatibility; right now, when a server pushes an option to the client that is unrecognized the client will print a warning but it will not abort. This could be used to push a 'negotation request' - if the client responds then a negotation phase can start , during which the encryption key, hashing cipher, MTU settings etc can be negotiated. If the client does not respond the server would need to assume that it's a 2.3 or older client.
Maybe I'm a bit naive, but since the data layer cipher is independent of the TLS cipher anyway, can't we just "push cipher xxx"?
Or is push/pull crypted with the data layer cipher?
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 Gert,
Quoted 4 lines · Gert Doering
Hi,
On Thu, Aug 01, 2013 at 12:02:55PM +0200, Jan Just Keijser wrote:
Quoted 9 lines
Quoted 2 lines
It should be possible to add negotiation without completely breaking backwards compatibility; right now, when a server pushes an option to the client that is unrecognized the client will print a warning but it will not abort. This could be used to push a 'negotation request' - if the client responds then a negotation phase can start , during which the encryption key, hashing cipher, MTU settings etc can be negotiated. If the client does not respond the server would need to assume that it's a 2.3 or older client.
Maybe I'm a bit naive, but since the data layer cipher is independent of the TLS cipher anyway, can't we just "push cipher xxx"?
Or is push/pull crypted with the data layer cipher?
good question and one that I've asked myself as well - there seems to be something funny going on with the data layer cipher (or auth parm) . I remember that I tried making the cipher and auth settings pushable and failed miserably. The flow of when and how the data cipher (and digest) are set up seems to be complicated and may happen (partially) *before* the options are pushed. Perhaps someone else (JamesY?) can comment on this.
cheers,
JJK
We've recently merged some patches allowing OpenVPN to negotiate certain settings (such as compression), but unfortunately at this time neither cipher nor auth directives can be negotiated in the 2.x branch.
The 3.0 branch has fixed this somewhat by having the client support cipher and auth directives that are pushed by the server (*).
However, to make cipher/auth negotiation really work, there are a few more things that are needed. For one, the client would need to push a list of supported cipher/auth methods, so the server can choose a mutually supported combination. Another possibility is to have OpenVPN leverage on the preexisting TLS ciphersuite negotiation, so as to use the same cipher/auth settings as TLS.
Some of this was discussed recently in the TLS versioning thread on openvpn-devel:
James
* The 3.0 branch is currently used by the OpenVPN Connect clients for Android and iOS. Source core for the core is available from http://staging.openvpn.net/openvpn3/
Quoted 51 lines · Jan Just Keijser
Hi Gert,
Quoted 14 lines · Gert Doering
Hi,
Quoted 9 lines · Jan Just Keijser
It should be possible to add negotiation without completely breaking backwards compatibility; right now, when a server pushes an option to the client that is unrecognized the client will print a warning but it will not abort. This could be used to push a 'negotation request' - if the client responds then a negotation phase can start , during which the encryption key, hashing cipher, MTU settings etc can be negotiated. If the client does not respond the server would need to assume that it's a 2.3 or older client.
Quoted 6 lines
Maybe I'm a bit naive, but since the data layer cipher is independent of the TLS cipher anyway, can't we just "push cipher xxx"?
Or is push/pull crypted with the data layer cipher?
good question and one that I've asked myself as well - there seems to be something funny going on with the data layer cipher (or auth parm) . I remember that I tried making the cipher and auth settings pushable and failed miserably. The flow of when and how the data cipher (and digest) are set up seems to be complicated and may happen (partially) *before* the options are pushed.
Perhaps someone else (JamesY?) can comment on this.cheers,
JJK
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Quoted 11 lines · James Yonan
However, to make cipher/auth negotiation really work, there are a few more things that are needed. For one, the client would need to push a list of supported cipher/auth methods, so the server can choose a mutually supported combination. Another possibility is to have OpenVPN leverage on the preexisting TLS ciphersuite negotiation, so as to use the same cipher/auth settings as TLS.
Some of this was discussed recently in the TLS versioning thread on openvpn-devel:
Speaking of which, some interesting discussions in
http://www.slideshare.net/astamos/bh-slides
WRT to the current state of crypto technologies and the ability to change cryptography in the field when design weaknesses are discovered. ECC support and OpenVPN is mentioned as being broken ?
---Mike
Quoted 72 lines
James
* The 3.0 branch is currently used by the OpenVPN Connect clients for Android and iOS. Source core for the core is available from
http://staging.openvpn.net/openvpn3/Quoted 46 lines · Jan Just Keijser
Hi Gert,
Quoted 14 lines · Gert Doering
Hi,
Quoted 9 lines · Jan Just Keijser
It should be possible to add negotiation without completely breaking backwards compatibility; right now, when a server pushes an option to the client that is unrecognized the client will print a warning but it will not abort. This could be used to push a 'negotation request' - if the client responds then a negotation phase can start , during which the encryption key, hashing cipher, MTU settings etc can be negotiated. If the client does not respond the server would need to assume that it's a 2.3 or older client.
Quoted 6 lines
Maybe I'm a bit naive, but since the data layer cipher is independent of the TLS cipher anyway, can't we just "push cipher xxx"?
Or is push/pull crypted with the data layer cipher?
good question and one that I've asked myself as well - there seems to be something funny going on with the data layer cipher (or auth parm) . I remember that I tried making the cipher and auth settings pushable and failed miserably. The flow of when and how the data cipher (and digest) are set up seems to be complicated and may happen (partially) *before* the options are pushed.
Perhaps someone else (JamesY?) can comment on this.cheers,
JJK
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrkQuoted 5 lines
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Signature · 5 lines
------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, [email protected]... Providing Internet services since 1994 www.sentex.net Cambridge, Ontario Canada http://www.tancsa.com/
Quoted 19 lines · dan farmer
To start with - I really, really appreciate the work that's gone into the program. I've released stuff myself, and it's not an easy process, especially for something as complex and with so much functionality as openvpn. I get that.
But from a user's perspective - anything that can make the horror known as openvpn configuration easier would improve openvpn's adoption considerably.
Here's a true tale. I'm writing a little thing to use openvpn. I'd like to think I know networks a bit - more on the theory at times than implementation, but whatever.
OpenVPN ranks up there with pgp and openssh for the most fucked up and mysterious configurations I've ever seen (it is not a coincidence that they're all crypto programs, I believe.) It is legendary among non-openvpn people to
be ridiculously difficult. I'm actually pretty sure that if one is an openvpn person
who knows you're doing it's not that bad, or even makes some internal sense. But I'd wager that high-ninety% of your user base doesn't fall into that camp. Well, of your potential user base, that is, most don't get that far.
Quoted 8 lines
I am not saying this to say "everything is fuxx3d up" or something. I'm telling you because it took me a couple of days to get even the most basic thing really working on a not-terribly-complex setup. And while I understand the conceptual matters of your program, honestly, I fear to set it up, and have little faith that even if I get it running it'll do what I want it to.
I'm not even complaining for myself - I'm a big guy, I can take care of myself, and take it or leave it - but for others…..
[...snip...]
The documentation to OpenVPN might feel daunting, but it really isn't that bad if you just get started on the easy paths. And if you really want a hand-held guide through setting up OpenVPN ... go grab this book:
<http://www.packtpub.com/openvpn-2-cookbook/book>
I'm not aiming this message against you, Dan, so please don't take it as an personal attack of any kind.
The biggest problem, from my experience, isn't that people don't understand the official docs. But they use external sources for setting up OpenVPN, like random blog or forum posts on sites not controlled by the OpenVPN community at all. And really, in 99% of all those posts, they contradict each other or basically recommend completely clueless setups which are just plain wrong. Why? Because these writers often don't understand NETWORKING at all.
First of all, if you want to setup any kind of VPN, you NEED to understand basic networking. If your network experience is based on setting up a home router and you got it working, then you know NOTHING about networking. Go read about how TCP/IP functions and at minimum learn the BASIC ROUTING. Without that, you're going to get lost.
Next, OpenVPN configurations are basically 2 parts. It's the security part, which involves setting up security parameters (ciphers, keys, etc) and which host to connect to. The other part is NETWORK ROUTING. No matter what kind of VPN setup you configure, you must understand routing. Then there is the more advanced parts, such as firewalling, MTU, fragmentation, and similar topics.
Most people I've met on #openvpn, in this mailing lists and those times I've looked at our forum, they struggle with the latter. Almost everyone manages to set up and configure OpenVPN server and clients and make them connect without much help at all (when having issues, it's mostly related to PKI setups). They usually show up when their brand new OpenVPN setup doesn't pass traffic through their OpenVPN server or client. Which really makes me repeat what I've said in the two past
paragraphs: To setup VPN you MUST UNDERSTAND BASIC NETWORK ROUTING. You say "briding"? I'll repeat: NETWORK ROUTING. Really!
And many of those who begin to struggle, seek help in various wikis, blogs and whatever else they find. But the *minority* of these sources explains things correctly. I think I've seen just a handful of those thousands of blogs which really makes sense. Unfortunately, I've not indexed the good sources.
At the end, I'll provide a few pointers which hopefully can help people solving their issues.
* Learn about TCP/IP networking, read especially chapter 3.1 in this
book: <http://www.redbooks.ibm.com/redbooks/pdfs/gg243376.pdf>. I'll
repeat: You MUST know how network traffic travels between hosts and routers.
* Then first configure a very simple OpenVPN setup, based on this HOWTO:
<http://openvpn.net/index.php/open-source/documentation/miscellaneous/static-key-mini-howto.html>
Go through this one, step by step.
* Use the man page as a companion and read about what each option used above does:
<https://community.openvpn.net/openvpn/wiki/Openvpn23ManPage>
* Extend the configuration above with a PKI setup (enhacned security):
<http://openvpn.net/index.php/open-source/documentation/howto.html#pki>
* Set up a reasonable routed network configuration with firewalling, based on this one:
<https://community.openvpn.net/openvpn/wiki/BridgingAndRouting#Usingrouting>
By going through these steps, I believe most users should be able to set up a working VPN.
But it's a lot to learn, if you haven't done this before. There are no shortcuts into setting up a VPN. You simply must learn these basic steps. The cookbook I mentioned in the beginning might make things easier to get started, but you still need to do some learning; at least when things doesn't work as expected.
Signature · 3 lines
kind regards, David Sommerseth
Hi David,
nice answer, David, and thanks for promoting the book ;)
Your basic points are correct , of course:
- networking is hard
- security is hard
Configuring openvpn can be daunting at first, but it is not nearly as bad as configuring PPTP , or - GASP! - IPSec+L2TP.
Documentation can help , of course, but to do things right will always require work.
Also, each setup is unique: there are some default setups, of course, most/some of which are covered in my cookbook, but after answering a lot of questions on the mailing list and forums I've found that each networking setup is unique and openvpn needs to be adjusted for it. I've always found the flexibility of openvpn its true power - but with great power (flexibility) comes great responsibility (about documenting things).
Dan also has a point however: we should watch out for introducing new features that nobody really understands how to use or why you would use them - the docs should be kept up to par with the features. My cookbook, for example, does not cover any of the features found in 2.3 like IPv6 - I hope I can write an update in the near future. I was and am hoping that an auto-negotiate feature would improve the usability of openvpn - if you can negotiate and or push more settings from the server to the clients then the client configs can be as simple as possible , which should reduce complexity.
JM2CW,
JJK
Quoted 107 lines · David Sommerseth
Quoted 13 lines · dan farmer
To start with - I really, really appreciate the work that's gone into the program. I've released stuff myself, and it's not an easy process, especially for something as complex and with so much functionality as openvpn. I get that.
But from a user's perspective - anything that can make the horror known as openvpn configuration easier would improve openvpn's adoption considerably.
Here's a true tale. I'm writing a little thing to use openvpn. I'd like to think I know networks a bit - more on the theory at times than implementation, but whatever.
OpenVPN ranks up there with pgp and openssh for the most fucked up and mysterious configurations I've ever seen (it is not a coincidence that they're
all crypto programs, I believe.) It is legendary among non-openvpn people to
be ridiculously difficult. I'm actually pretty sure that if one is an openvpn person
who knows you're doing it's not that bad, or even makes some internal sense. But I'd wager that high-ninety% of your user base doesn't fall into that camp. Well, of your potential user base, that is, most don't get that far.Quoted 8 lines
I am not saying this to say "everything is fuxx3d up" or something. I'm telling you because it took me a couple of days to get even the most basic thing really working on a not-terribly-complex setup. And while I understand the conceptual matters of your program, honestly, I fear to set it up, and have little faith that even if I get it running it'll do what I want it to.
I'm not even complaining for myself - I'm a big guy, I can take care of myself, and take it or leave it - but for others…..
[...snip...]
The documentation to OpenVPN might feel daunting, but it really isn't that bad if you just get started on the easy paths. And if you really want a hand-held guide through setting up OpenVPN ... go grab this book:
<http://www.packtpub.com/openvpn-2-cookbook/book>
I'm not aiming this message against you, Dan, so please don't take it as an personal attack of any kind.
The biggest problem, from my experience, isn't that people don't understand the official docs. But they use external sources for setting up OpenVPN, like random blog or forum posts on sites not controlled by the OpenVPN community at all. And really, in 99% of all those posts, they contradict each other or basically recommend completely clueless setups which are just plain wrong. Why? Because these writers often don't understand NETWORKING at all.
First of all, if you want to setup any kind of VPN, you NEED to understand basic networking. If your network experience is based on setting up a home router and you got it working, then you know NOTHING about networking. Go read about how TCP/IP functions and at minimum learn the BASIC ROUTING. Without that, you're going to get lost.
Next, OpenVPN configurations are basically 2 parts. It's the security part, which involves setting up security parameters (ciphers, keys, etc) and which host to connect to. The other part is NETWORK ROUTING. No matter what kind of VPN setup you configure, you must understand routing. Then there is the more advanced parts, such as firewalling, MTU, fragmentation, and similar topics.
Most people I've met on #openvpn, in this mailing lists and those times I've looked at our forum, they struggle with the latter. Almost everyone manages to set up and configure OpenVPN server and clients and make them connect without much help at all (when having issues, it's mostly related to PKI setups). They usually show up when their brand new OpenVPN setup doesn't pass traffic through their OpenVPN server or client. Which really makes me repeat what I've said in the two past
paragraphs: To setup VPN you MUST UNDERSTAND BASIC NETWORK ROUTING. You say "briding"? I'll repeat: NETWORK ROUTING. Really!And many of those who begin to struggle, seek help in various wikis, blogs and whatever else they find. But the *minority* of these sources explains things correctly. I think I've seen just a handful of those thousands of blogs which really makes sense. Unfortunately, I've not indexed the good sources.
At the end, I'll provide a few pointers which hopefully can help people solving their issues.
* Learn about TCP/IP networking, read especially chapter 3.1 in this
book: <http://www.redbooks.ibm.com/redbooks/pdfs/gg243376.pdf>. I'll
repeat: You MUST know how network traffic travels between hosts and routers.* Then first configure a very simple OpenVPN setup, based on this HOWTO:
<http://openvpn.net/index.php/open-source/documentation/miscellaneous/static-key-mini-howto.html>Go through this one, step by step.
* Use the man page as a companion and read about what each option used above does:
<https://community.openvpn.net/openvpn/wiki/Openvpn23ManPage>* Extend the configuration above with a PKI setup (enhacned security):
<http://openvpn.net/index.php/open-source/documentation/howto.html#pki>* Set up a reasonable routed network configuration with firewalling, based on this one:
<https://community.openvpn.net/openvpn/wiki/BridgingAndRouting#Usingrouting>By going through these steps, I believe most users should be able to set up a working VPN.
But it's a lot to learn, if you haven't done this before. There are no shortcuts into setting up a VPN. You simply must learn these basic steps. The cookbook I mentioned in the beginning might make things easier to get started, but you still need to do some learning; at least when things doesn't work as expected.
Hi,
I'm a bit late to that, but had always planned to respond to this...
Quoted 2 lines · dan farmer
But from a user's perspective - anything that can make the horror known as openvpn configuration easier would improve openvpn's adoption considerably.
The issue here is that VPN is a highly complex matter, *and* that OpenVPN is way too flexible :-)
Let me explain.
When you do commercial SSL-VPN products, usually you have a server that is closed, has a web interface, and you only get to select a few possible options, like "authenticate against a radius server" or - if you're lucky - what IP range to use. Then the commercial VPN product will create a config file that you can then import into the client, and voila, zero-conf VPN.
Now, if you want that with OpenVPN, you can use the OpenVPN Advanced Server
- commercial product, nice web interface (which actually *can* configure most of the stuff, but the defaults work), maintenance contract, support, and on the click of a button, it will produce a ready-made .ovpn profile that you import into the client, with (voila!) zero-config :-)
OTOH, using the community OpenVPN, you have all the tools that you can imagine to twiddle
- how you want to connect your networks - network-to-network, client-to- network, bridged client-to-network, fake bridging with proxy-ARP over tun, you-name-it -> whatever networking problem you have, the chance is high that you can solve it with OpenVPN.
- how you want to authenticate your clients - certificates, user+password, both, external sources (radius, PAM, ...)
- and potentially even modify the server config for each client on-the-fly with one of the umpteen script hooks
this is cool, but makes server configuration quite difficult indeed, as you need to decide what you *want* to achieve - and as David and others have mentioned before, most of the time the problems are not "the VPN side" but "the IP routing side of things" (I do that for a living, but I know it from my colleagues' faces that some of the tricks can be a *bit* hard to grok...).
If the server is done, and you know how you want the client side to look like, the client config is actually fairly simple in most cases - tell it where to look ("remote 1.2.3.4"), what protocol to use ("mode udp") and how to authenticate ("ca", "cert", "key"). Most of the rest can be pushed by the server...
Of course then you're back into crypto lala land - crypto is hard, CAs are even harder, and *understanding* how the bits and pieces fit together can be a challenge (especially with the lovely openssl command line tools).
Now, I'm not sure what the conclusion of that is - maybe "use raw OpenVPN if you're willing to dig into IP routing and crypto CA stuff, and want the full control - and use a product with a hide-the-details GUI like OpenVPN AS otherwise, and accept the choices that the GUI writer made for you"?
OTOH, we *do* ship quite a stack of config files in our tree...
openvpn/sample/sample-config-files$ ls -l
total 92
-rw-r--r-- 1 gert users 131 Feb 2 2013 README -rw-r--r-- 1 gert users 3426 Feb 2 2013 client.conf -rwxr-xr-x 1 gert users 3562 Feb 2 2013 firewall.sh -rwxr-xr-x 1 gert users 62 Feb 2 2013 home.up -rw-r--r-- 1 gert users 639 Feb 2 2013 loopback-client -rw-r--r-- 1 gert users 665 Feb 2 2013 loopback-server -rwxr-xr-x 1 gert users 62 Feb 2 2013 office.up -rwxr-xr-x 1 gert users 63 Feb 2 2013 openvpn-shutdown.sh -rwxr-xr-x 1 gert users 776 Feb 2 2013 openvpn-startup.sh -rw-r--r-- 1 gert users 10288 Feb 2 2013 server.conf -rw-r--r-- 1 gert users 1742 Feb 2 2013 static-home.conf -rw-r--r-- 1 gert users 1688 Feb 2 2013 static-office.conf -rw-r--r-- 1 gert users 1937 Feb 2 2013 tls-home.conf -rw-r--r-- 1 gert users 1948 Feb 2 2013 tls-office.conf -rw-r--r-- 1 gert users 199 Feb 2 2013 xinetd-client-config -rw-r--r-- 1 gert users 989 Feb 2 2013 xinetd-server-config
... maybe we should do more advertising for these?
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 2 lines · Jan Just Keijser
Configuring openvpn can be daunting at first, but it is not nearly as bad as configuring PPTP , or - GASP! - IPSec+L2TP.
PPTP is actually way easier than OpenVPN :-) - why? Because you have much less choices regarding IP addresses and routing... unless you try to link two full networks (as opposed to client-to-server) with PPTP, then it will get ... interesting :-)
[..]
Quoted 5 lines
Dan also has a point however: we should watch out for introducing new features that nobody really understands how to use or why you would use them - the docs should be kept up to par with the features. My cookbook, for example, does not cover any of the features found in 2.3 like IPv6 - I hope I can write an update in the near future.
That update would be appreciated - while nobody wants to understand IPv6, I consider it unavoidable in the near-term future (3-5 years at the latest), so cooking recipes should cover it...
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 10 lines · Les Mikesell
Quoted 4 lines · David Sommerseth
* Learn about TCP/IP networking, read especially chapter 3.1 in this
book: <http://www.redbooks.ibm.com/redbooks/pdfs/gg243376.pdf>. I'll
repeat: You MUST know how network traffic travels between hosts and routers.Maybe, maybe not... Lots of people would be perfectly happy with a
bridged configuration - which isn't recommended because of performance issues on large scales.
Which mostly isn't recommended because it's no easier than routed, it just pretends to. After setting "basic bridged", people usually ask how to connect another network behind the "bridged client" node, and then you're fully back into routing land...
Quoted 2 lines
And at least an equal number would be happy with the openvpn host doing NAT on its LAN interface.
Now that is why OpenVPN AS exists :-) - it does exactly this. Default network is assigned to the tun interface (can be changed, but default works), iptables NAT rules added automatically (can be turned off, but on-by-default), stuff just works. Choices answered for you.
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]...