Multiple VPN connections on the same port
Hi,
I am interested to know what is the update/status one above. I see email thread as:
Hi Sampo,
> I have been busy writing a forking server > addon to openvpn.
Cool... Does each potential connecting client need a separate config file, or does the server use a common client template and then keep track of things like dynamic ports, dynamic endpoint addresses, etc?
> In openvpn.c I have separated the processing of > parameters from main() to a new function and > moved main to another file to allow me to > link against different main() functions. >
> One that implements normal peer2peer vpn > and two others that produces forkin' server > and client.
>
> These use a simple UDP protocol to agree a > port to use, after which server forks do > some handshaking with client and then > calls openvpn() funcition from openvpn.c
Are you sure there needs to be a new protocol to do this?
Suppose the master server listens on a particular port, reads the initial datagram from a connecting client, verifies the integrity of the datagram using a --tls-auth variant, allocates a dynamic port, forks a new server process, and continues in its event loop.
When the forked process finishes up the TLS authentication, it can take the Common Name from the client certificate and use it to determine the appropriate config profile to use (containing ifconfig addresses, route statements, etc.)
Or the handshaking could be done by passing a configuration string in the TLS payload, similar to the string now built by options_string().
> This way I have been able to keep > those well tested procedures and protocol > of openvpn untouched.
>
> I still have some questions unsolved like > DoS protection, dropping root priviledges > and how to handel SIGUSR1 and SIGHUP.
Maybe keep track of all children, so when the master process gets a signal, it dispatches it to each child process, then to itself.
> I hope I can overcome these and mail
> you a patch.
>
>
>
>
> Sampo
>
>
>
> > Hi Michael,
> >
> > Right now OpenVPN doesn't support a forking-server model on a single port,
> > it's strictly peer-to-peer with an OpenVPN process instantiated at both ends
> > of the connection, and each connection on a unique port. > >
> > There has been some recent discussions about a forking-server implementation
> > on this list -- see the "add a server feature to openvpn to share udp > > ports?" thread in the openvpn-devel archives.
> >
> > I think the simplest way to do this would be something like:
> >
> > (1) Add a --forking-server flag that causes the main OpenVPN event loop to
> > fork a new process for each initial datagram received from a client. > > (2) The newly forked server process switches to a dynamic port before > > responding back to the connecting client. This is quite a bit simpler and
> > more efficient than trying to run all clients over the same UDP port. > > (3) OpenVPN already has code (see the implementation of --float) that will
> > adapt to the new port number returned by the response to initial datagram
> > sent from server to client. I have also confirmed that this type of UDP > > port switch is recognized by both Linux and Cisco stateful firewalls. > >
> > There are a some complications that would need to be handled:
> >
> > (1) You would need to protect against DoS attacks that flood the server with
> > fork requests. Possibly some variation of --tls-auth that would > > authenticate the initial packet before the fork call. > >
> > (2) If a client connects, gets disconnected, then connects again, you would
> > need to make sure that the old server process gets killed before a new > > server process is forked.
> >
> > Unfortunately I'm pretty busy right now with my day job, so I may not get to
> > this for a while. If you want to take a shot at some kind of > > implementation, I will do my best to answer your questions. > >
> > Best Regards,
> > James
> >
> > ----- Original Message -----
> > From: "Michael Grigoriev" <[email protected]...>
> > To: <[email protected]...>
> > Sent: Monday, July 22, 2002 6:53 PM
> > Subject: [Openvpn-devel] Multiple VPN connections on the same port > >
__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp
Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
Hello,
Sorry it took so long to reply, but I haven't read my work mail for a while due to all the exams.
We have been using openvpn with this multiple connection hack of mine for a while with our embedded linux systems and it has been running fine. Still there is a lot of testing to do and it ain't finnished in any sense.
For example, at the moment it is very sensitive to reply attacks.
I have tried to make it as independent as possible from the openvon peer2peer version as possible. That's why I have used my own little protocol for handshaking and allocating a new UDP-port.
If you are intrested in giving it a try I can mail the source for you.
It still uses an old openvpn version but it should not be very difficult to merge with a newer version, haven't just got the time for that.
Let me know if you wan't a tar-bal to try it out.
Sampo
Quoted 136 lines
Hi,
I am interested to know what is the update/status one above. I see email thread as:
Hi Sampo,
> I have been busy writing a forking server > addon to openvpn.
Cool... Does each potential connecting client need a separate config file, or does the server use a common client template and then keep track of things like dynamic ports, dynamic endpoint addresses, etc?
> In
openvpn.cI have separated the processing of > parameters frommain()to a new function and > moved main to another file to allow me to > link against differentmain()functions. >
> One that implements normal peer2peer vpn > and two others that produces forkin' server > and client.
>
> These use a simple UDP protocol to agree a > port to use, after which server forks do > some handshaking with client and then > callsopenvpn()funcition fromopenvpn.cAre you sure there needs to be a new protocol to do this?
Suppose the master server listens on a particular port, reads the initial datagram from a connecting client, verifies the integrity of the datagram using a --tls-auth variant, allocates a dynamic port, forks a new server process, and continues in its event loop.
When the forked process finishes up the TLS authentication, it can take the Common Name from the client certificate and use it to determine the appropriate config profile to use (containing ifconfig addresses, route statements, etc.)
Or the handshaking could be done by passing a configuration string in the TLS payload, similar to the string now built by
options_string().> This way I have been able to keep > those well tested procedures and protocol > of openvpn untouched.
>
> I still have some questions unsolved like > DoS protection, dropping root priviledges > and how to handel SIGUSR1 and SIGHUP.Maybe keep track of all children, so when the master process gets a signal, it dispatches it to each child process, then to itself.
> I hope I can overcome these and mail
> you a patch.
>
>
>
>
> Sampo
>
>
>
> > Hi Michael,
> >
> > Right now OpenVPN doesn't support a forking-server model on a single port,
> > it's strictly peer-to-peer with an OpenVPN process instantiated at both ends
> > of the connection, and each connection on a unique port. > >
> > There has been some recent discussions about a forking-server implementation
> > on this list -- see the "add a server feature to openvpn to share udp > > ports?" thread in the openvpn-devel archives.
> >
> > I think the simplest way to do this would be something like:
> >
> > (1) Add a --forking-server flag that causes the main OpenVPN event loop to
> > fork a new process for each initial datagram received from a client. > > (2) The newly forked server process switches to a dynamic port before > > responding back to the connecting client. This is quite a bit simpler and
> > more efficient than trying to run all clients over the same UDP port. > > (3) OpenVPN already has code (see the implementation of --float) that will
> > adapt to the new port number returned by the response to initial datagram
> > sent from server to client. I have also confirmed that this type of UDP > > port switch is recognized by both Linux and Cisco stateful firewalls. > >
> > There are a some complications that would need to be handled:
> >
> > (1) You would need to protect against DoS attacks that flood the server with
> > fork requests. Possibly some variation of --tls-auth that would > > authenticate the initial packet before the fork call. > >
> > (2) If a client connects, gets disconnected, then connects again, you would
> > need to make sure that the old server process gets killed before a new > > server process is forked.
> >
> > Unfortunately I'm pretty busy right now with my day job, so I may not get to
> > this for a while. If you want to take a shot at some kind of > > implementation, I will do my best to answer your questions. > >
> > Best Regards,
> > James
> >
> > ----- Original Message -----
> > From: "Michael Grigoriev" <[email protected]...>
> > To: <[email protected]...>
> > Sent: Monday, July 22, 2002 6:53 PM
> > Subject: [Openvpn-devel] Multiple VPN connections on the same port > >__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jspGet your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Sampo,
We've added some features to 1.3.2 and pre-1.3.3 code that are a step in the direction of full forking server support.
For example, 1.3.2 supports instantiation by inetd/xinetd. xinetd has its own DoS resistant features, and I added a new flag to the pre-1.3.3 code (--replay-persist) in the CVS to do replay protection that is persistent across sessions.
The only thing we don't have yet is the ability to define an incoming connection template which can be applied to more than one client. Also, allowing multiple tunnels to share the same UDP port is problematic, mostly for efficiency reasons (since packets must be dispatched, it increases the number of context switches per packet).
James
Quoted 21 lines · Sampo Nurmentaus
Hello,
Sorry it took so long to reply, but I haven't read my work mail for a while due to all the exams.
We have been using openvpn with this multiple connection hack of mine for a while with our embedded linux systems and it has been running fine. Still there is a lot of testing to do and it ain't finnished in any sense.
For example, at the moment it is very sensitive to reply attacks.I have tried to make it as independent as possible from the openvon peer2peer version as possible. That's why I have used my own little protocol for handshaking and allocating a new UDP-port.
If you are intrested in giving it a try I can mail the source for you.
Quoted 20 lines
It still uses an old openvpn version but it should not be very difficult to merge with a newer version, haven't just got the time for that.
Let me know if you wan't a tar-bal to try it out.
Sampo
Quoted 11 lines
Hi,
I am interested to know what is the update/status one above. I see email thread as:
Hi Sampo,
> I have been busy writing a forking server > addon to openvpn.
Cool... Does each potential connecting
client need a separate config file,
Quoted 1 line
Quoted 1 line
or does the server use a common client
template and then keep track of
Quoted 1 line
Quoted 1 line
things like dynamic ports, dynamic
endpoint addresses, etc?
Quoted 2 lines
Quoted 2 lines
> In
openvpn.cI have separated the
processing of
Quoted 1 line
Quoted 1 line
> parameters from
main()to a new
function and
Quoted 5 lines
Quoted 5 lines
> moved main to another file to allow me to > link against different
main()functions. >
> One that implements normal peer2peer vpn > and two others that produces forkin'
server
Quoted 8 lines
Quoted 8 lines
> and client.
>
> These use a simple UDP protocol to agree a > port to use, after which server forks do > some handshaking with client and then > callsopenvpn()funcition fromopenvpn.cAre you sure there needs to be a new
protocol to do this?
Quoted 2 lines
Quoted 2 lines
Suppose the master server listens on a
particular port, reads the initial
Quoted 1 line
Quoted 1 line
datagram from a connecting client,
verifies the integrity of the datagram
Quoted 1 line
Quoted 1 line
using a --tls-auth variant, allocates a
dynamic port, forks a new server
Quoted 3 lines
Quoted 3 lines
process, and continues in its event loop.
When the forked process finishes up the
TLS authentication, it can take the
Quoted 1 line
Quoted 1 line
Common Name from the client certificate
and use it to determine the
Quoted 1 line
Quoted 1 line
appropriate config profile to use
(containing ifconfig addresses, route
Quoted 3 lines
Quoted 3 lines
statements, etc.)
Or the handshaking could be done by
passing a configuration string in the
Quoted 1 line
Quoted 1 line
TLS payload, similar to the string now
built by options_string().
Quoted 10 lines
Quoted 10 lines
> This way I have been able to keep > those well tested procedures and protocol > of openvpn untouched.
>
> I still have some questions unsolved like > DoS protection, dropping root priviledges > and how to handel SIGUSR1 and SIGHUP.Maybe keep track of all children, so
when the master process gets a signal,
Quoted 1 line
Quoted 1 line
it dispatches it to each child process,
then to itself.
Quoted 14 lines
Quoted 14 lines
> I hope I can overcome these and mail > you a patch. > > > > > Sampo > > > > > Hi Michael, > > > > Right now OpenVPN doesn't support a
forking-server model on a single
Quoted 2 lines
Quoted 2 lines
port,
> > it's strictly peer-to-peer with an
OpenVPN process instantiated at both
Quoted 2 lines
Quoted 2 lines
ends
> > of the connection, and each
connection on a unique port.
Quoted 2 lines
Quoted 2 lines
> >
> > There has been some recent
discussions about a forking-server
Quoted 2 lines
Quoted 2 lines
implementation
> > on this list -- see the "add a
server feature to openvpn to share udp
Quoted 1 line
Quoted 1 line
> > ports?" thread in the openvpn-devel
archives.
Quoted 2 lines
Quoted 2 lines
> >
> > I think the simplest way to do this
would be something like:
Quoted 2 lines
Quoted 2 lines
> > > > (1) Add a --forking-server flag that
causes the main OpenVPN event loop
Quoted 2 lines
Quoted 2 lines
to
> > fork a new process for each initial
datagram received from a client.
Quoted 1 line
Quoted 1 line
> > (2) The newly forked server process
switches to a dynamic port before
Quoted 1 line
Quoted 1 line
> > responding back to the connecting
client. This is quite a bit simpler
Quoted 2 lines
Quoted 2 lines
and
> > more efficient than trying to run
all clients over the same UDP port.
Quoted 1 line
Quoted 1 line
> > (3) OpenVPN already has code (see
the implementation of --float) that
Quoted 2 lines
Quoted 2 lines
will
> > adapt to the new port number
returned by the response to initial
Quoted 2 lines
Quoted 2 lines
datagram
> > sent from server to client. I have
also confirmed that this type of UDP
Quoted 1 line
Quoted 1 line
> > port switch is recognized by both
Linux and Cisco stateful firewalls.
Quoted 2 lines
Quoted 2 lines
> >
> > There are a some complications that
would need to be handled:
Quoted 2 lines
Quoted 2 lines
> >
> > (1) You would need to protect
against DoS attacks that flood the server
Quoted 2 lines
Quoted 2 lines
with
> > fork requests. Possibly some
variation of --tls-auth that would
Quoted 1 line
Quoted 1 line
> > authenticate the initial packet
before the fork call.
Quoted 2 lines
Quoted 2 lines
> >
> > (2) If a client connects, gets
disconnected, then connects again, you
Quoted 2 lines
Quoted 2 lines
would
> > need to make sure that the old
server process gets killed before a new
Quoted 3 lines
Quoted 3 lines
> > server process is forked. > >
> > Unfortunately I'm pretty busy right
now with my day job, so I may not
Quoted 2 lines
Quoted 2 lines
get to
> > this for a while. If you want to
take a shot at some kind of
Quoted 1 line
Quoted 1 line
> > implementation, I will do my best to
answer your questions.
Quoted 9 lines
Quoted 9 lines
> > > > Best Regards, > > James > > > > ----- Original Message ----- > > From: "Michael Grigoriev" <[email protected]...> > > To: <[email protected]...> > > Sent: Monday, July 22, 2002 6:53 PM > > Subject: [Openvpn-devel] Multiple
VPN connections on the same port
Quoted 4 lines
Quoted 4 lines
> >__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now!
http://channels.netscape.com/ns/browsers/download.jsp
Quoted 2 lines
Quoted 2 lines
Get your own FREE, personal Netscape Mail account today at
Quoted 24 lines
Quoted 12 lines
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Hello James,
That's good to hear,
There are some questions that I had to over come with my experimental forking server, like when does a forked process exit? Should we always use something line --inactive or --ping-exit? Or should there be a control command for closing the connection?
I still mainly consentrated on using shared secret but how about managing client sertificates. Does openvpn understand sertificate revocation lists so that some sertificates can be bloked?
I think that there should also be some secure way in the protocol to pass the tunnel parameters to the other end
so that both ends don't have to have all the configuration data available. For example, in our case embedded clients can tell the server the endpoint addresses so each of them can be reach trough a pre configured static ip.
Or other way round, the server can pass the addresses to the client from a pool of addressess, when server
is given the endpoint address ranges to use.
Managing the parameters at the both end propably causes more problems due to config errors, than passing the parameters over the untrusted communication channel. :-)
SaBe
Quoted 247 lines
Sampo,
We've added some features to 1.3.2 and pre-1.3.3 code that are a step in the direction of full forking server support.
For example, 1.3.2 supports instantiation by inetd/xinetd. xinetd has its own DoS resistant features, and I added a new flag to the pre-1.3.3 code (--replay-persist) in the CVS to do replay protection that is persistent across sessions.
The only thing we don't have yet is the ability to define an incoming connection template which can be applied to more than one client. Also, allowing multiple tunnels to share the same UDP port is problematic, mostly for efficiency reasons (since packets must be dispatched, it increases the number of context switches per packet).
James
Quoted 21 lines · Sampo Nurmentaus
Hello,
Sorry it took so long to reply, but I haven't read my work mail for a while due to all the exams.
We have been using openvpn with this multiple connection hack of mine for a while with our embedded linux systems and it has been running fine. Still there is a lot of testing to do and it ain't finnished in any sense.
For example, at the moment it is very sensitive to reply attacks.I have tried to make it as independent as possible from the openvon peer2peer version as possible. That's why I have used my own little protocol for handshaking and allocating a new UDP-port.
If you are intrested in giving it a try I can mail the source for you.
Quoted 20 lines
It still uses an old openvpn version but it should not be very difficult to merge with a newer version, haven't just got the time for that.
Let me know if you wan't a tar-bal to try it out.
Sampo
Quoted 11 lines
Hi,
I am interested to know what is the update/status one above. I see email thread as:
Hi Sampo,
> I have been busy writing a forking server > addon to openvpn.
Cool... Does each potential connecting
client need a separate config file,
Quoted 1 line
Quoted 1 line
or does the server use a common client
template and then keep track of
Quoted 1 line
Quoted 1 line
things like dynamic ports, dynamic
endpoint addresses, etc?
Quoted 2 lines
Quoted 2 lines
> In
openvpn.cI have separated theprocessing of
Quoted 1 line
Quoted 1 line
> parameters from
main()to a newfunction and
Quoted 5 lines
Quoted 5 lines
> moved main to another file to allow me to > link against different
main()functions. >
> One that implements normal peer2peer vpn > and two others that produces forkin'server
Quoted 8 lines
Quoted 8 lines
> and client.
>
> These use a simple UDP protocol to agree a > port to use, after which server forks do > some handshaking with client and then > callsopenvpn()funcition fromopenvpn.cAre you sure there needs to be a new
protocol to do this?
Quoted 2 lines
Quoted 2 lines
Suppose the master server listens on a
particular port, reads the initial
Quoted 1 line
Quoted 1 line
datagram from a connecting client,
verifies the integrity of the datagram
Quoted 1 line
Quoted 1 line
using a --tls-auth variant, allocates a
dynamic port, forks a new server
Quoted 3 lines
Quoted 3 lines
process, and continues in its event loop.
When the forked process finishes up the
TLS authentication, it can take the
Quoted 1 line
Quoted 1 line
Common Name from the client certificate
and use it to determine the
Quoted 1 line
Quoted 1 line
appropriate config profile to use
(containing ifconfig addresses, route
Quoted 3 lines
Quoted 3 lines
statements, etc.)
Or the handshaking could be done by
passing a configuration string in the
Quoted 1 line
Quoted 1 line
TLS payload, similar to the string now
built by
options_string().Quoted 10 lines
Quoted 10 lines
> This way I have been able to keep > those well tested procedures and protocol > of openvpn untouched.
>
> I still have some questions unsolved like > DoS protection, dropping root priviledges > and how to handel SIGUSR1 and SIGHUP.Maybe keep track of all children, so
when the master process gets a signal,
Quoted 1 line
Quoted 1 line
it dispatches it to each child process,
then to itself.
Quoted 14 lines
Quoted 14 lines
> I hope I can overcome these and mail > you a patch. > > > > > Sampo > > > > > Hi Michael, > > > > Right now OpenVPN doesn't support aforking-server model on a single
Quoted 2 lines
Quoted 2 lines
port,
> > it's strictly peer-to-peer with anOpenVPN process instantiated at both
Quoted 2 lines
Quoted 2 lines
ends
> > of the connection, and eachconnection on a unique port.
Quoted 2 lines
Quoted 2 lines
> >
> > There has been some recentdiscussions about a forking-server
Quoted 2 lines
Quoted 2 lines
implementation
> > on this list -- see the "add aserver feature to openvpn to share udp
Quoted 1 line
Quoted 1 line
> > ports?" thread in the openvpn-devel
archives.
Quoted 2 lines
Quoted 2 lines
> >
> > I think the simplest way to do thiswould be something like:
Quoted 2 lines
Quoted 2 lines
> > > > (1) Add a --forking-server flag thatcauses the main OpenVPN event loop
Quoted 2 lines
Quoted 2 lines
to
> > fork a new process for each initialdatagram received from a client.
Quoted 1 line
Quoted 1 line
> > (2) The newly forked server process
switches to a dynamic port before
Quoted 1 line
Quoted 1 line
> > responding back to the connecting
client. This is quite a bit simpler
Quoted 2 lines
Quoted 2 lines
and
> > more efficient than trying to runall clients over the same UDP port.
Quoted 1 line
Quoted 1 line
> > (3) OpenVPN already has code (see
the implementation of --float) that
Quoted 2 lines
Quoted 2 lines
will
> > adapt to the new port numberreturned by the response to initial
Quoted 2 lines
Quoted 2 lines
datagram
> > sent from server to client. I havealso confirmed that this type of UDP
Quoted 1 line
Quoted 1 line
> > port switch is recognized by both
Linux and Cisco stateful firewalls.
Quoted 2 lines
Quoted 2 lines
> >
> > There are a some complications thatwould need to be handled:
Quoted 2 lines
Quoted 2 lines
> >
> > (1) You would need to protectagainst DoS attacks that flood the server
Quoted 2 lines
Quoted 2 lines
with
> > fork requests. Possibly somevariation of --tls-auth that would
Quoted 1 line
Quoted 1 line
> > authenticate the initial packet
before the fork call.
Quoted 2 lines
Quoted 2 lines
> >
> > (2) If a client connects, getsdisconnected, then connects again, you
Quoted 2 lines
Quoted 2 lines
would
> > need to make sure that the oldserver process gets killed before a new
Quoted 3 lines
Quoted 3 lines
> > server process is forked. > >
> > Unfortunately I'm pretty busy rightnow with my day job, so I may not
Quoted 2 lines
Quoted 2 lines
get to
> > this for a while. If you want totake a shot at some kind of
Quoted 1 line
Quoted 1 line
> > implementation, I will do my best to
answer your questions.
Quoted 9 lines
Quoted 9 lines
> > > > Best Regards, > > James > > > > ----- Original Message ----- > > From: "Michael Grigoriev" <[email protected]...> > > To: <[email protected]...> > > Sent: Monday, July 22, 2002 6:53 PM > > Subject: [Openvpn-devel] MultipleVPN connections on the same port
Quoted 4 lines
Quoted 4 lines
> >__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now!http://channels.netscape.com/ns/browsers/download.jsp
Quoted 2 lines
Quoted 2 lines
Get your own FREE, personal Netscape Mail account today at
Quoted 24 lines
Quoted 12 lines
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Quoted 9 lines
Hello James,
That's good to hear,
There are some questions that I had to over come with my experimental forking server, like when does a forked process exit? Should we always use something line --inactive or --ping-exit? Or should there be a control command for closing the connection?
Good question, though nobody so far has complained that an openvpn session cannot be closed remotely. Most have been happy with --inactive & --ping-exit.
Quoted 4 lines
I still mainly consentrated on using shared secret but how about managing client sertificates. Does openvpn understand sertificate revocation lists so that some sertificates can be bloked?
It's not supported right now, but would probably be easy to add.
Quoted 9 lines
I think that there should also be some secure way in the protocol to pass the tunnel parameters to the other end
so that both ends don't have to have all the configuration data available. For example, in our case embedded clients can tell the server the endpoint addresses so each of them can be reach trough a pre configured static ip.
Or other way round, the server can pass the addresses to the client from a pool of addressess, when server
is given the endpoint address ranges to use.
I think trying to do this in the openvpn protocol itself could be a bug magnet, and would probably involve changing the protocol. A better idea IMHO would be to create a new server daemon which deals with negotiating the configuration parameters, then this daemon instantiates a server openvpn process. This daemon would probably communicate via vanilla TLS, i.e. TLS over a TCP connection. In OpenVPN 1.3.2 this server daemon can be inetd/xinetd, but without the feature that allows configuration information to be provided by a single end of the connection (which must still be written).
We could develop and rework this daemon independently of openvpn, thereby destabilizing neither the openvpn code nor the protocol during the development and prototype stages.
Another complexity that comes from allowing a client to produce configuration parameters for the server side as well is one of security. To what extent does the server trust the client to provide it, and how is this trust controlled and configured?
Quoted 5 lines
Managing the parameters at the both end propably causes more problems due to config errors, than passing the parameters over the untrusted communication channel. :-)
I definitely wouldn't want to pass the parameters over an untrusted channel.
You might check out the archives for a patch that was posted last spring or summer (autovpn?) for a script that does most of what I suggested above using a shell script and ssh.
James
Quoted 62 lines
SaBe
Quoted 58 lines
Sampo,
We've added some features to 1.3.2 and pre-1.3.3 code that are a step in the direction of full forking server support.
For example, 1.3.2 supports instantiation by inetd/xinetd. xinetd has its own DoS resistant features, and I added a new flag to the pre-1.3.3 code (--replay-persist) in the CVS to do replay protection that is persistent across sessions.
The only thing we don't have yet is the ability to define an incoming connection template which can be applied to more than one client. Also, allowing multiple tunnels to share the same UDP port is problematic, mostly for efficiency reasons (since packets must be dispatched, it increases the number of context switches per packet).
James
Quoted 38 lines · Sampo Nurmentaus
Hello,
Sorry it took so long to reply, but I haven't read my work mail for a while due to all the exams.
We have been using openvpn with this multiple connection hack of mine for a while with our embedded linux systems and it has been running fine. Still there is a lot of testing to do and it ain't finnished in any sense.
For example, at the moment it is very sensitive to reply attacks.I have tried to make it as independent as possible from the openvon peer2peer version as possible. That's why I have used my own little protocol for handshaking and allocating a new UDP-port.
If you are intrested in giving it a try I can mail the source for you.
It still uses an old openvpn version but it should not be very difficult to merge with a newer version, haven't just got the time for that.
Let me know if you wan't a tar-bal to try it out.
Sampo
Quoted 8 lines
Hi,
I am interested to know what is the update/status one above. I see email thread as:
Hi Sampo,
> I have been busy writing a forking
server
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
> addon to openvpn.
Cool... Does each potential connecting
client need a separate config file,
Quoted 1 line
Quoted 1 line
or does the server use a common client
template and then keep track of
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line
things like dynamic ports, dynamic
endpoint addresses, etc?
Quoted 2 lines
Quoted 2 lines
> In
openvpn.cI have separated theprocessing of
Quoted 1 line
Quoted 1 line
> parameters from
main()to a newfunction and
Quoted 1 line
Quoted 1 line
> moved main to another file to
allow me to
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
> link against different
main()
functions.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
>
> One that implements normal
peer2peer vpn
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
> and two others that produces forkin'
server
Quoted 3 lines
Quoted 3 lines
> and client.
>
> These use a simple UDP protocol to
agree a
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
> port to use, after which server
forks do
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
> some handshaking with client and then > calls
openvpn()funcition from
openvpn.c
Quoted 11 lines
Quoted 11 lines
Quoted 2 lines
Quoted 2 lines
Are you sure there needs to be a new
protocol to do this?
Quoted 2 lines
Quoted 2 lines
Suppose the master server listens on a
particular port, reads the initial
Quoted 1 line
Quoted 1 line
datagram from a connecting client,
verifies the integrity of the datagram
Quoted 1 line
Quoted 1 line
using a --tls-auth variant, allocates a
dynamic port, forks a new server
Quoted 1 line
Quoted 1 line
process, and continues in its event
loop.
Quoted 9 lines
Quoted 9 lines
Quoted 2 lines
Quoted 2 lines
When the forked process finishes up the
TLS authentication, it can take the
Quoted 1 line
Quoted 1 line
Common Name from the client certificate
and use it to determine the
Quoted 1 line
Quoted 1 line
appropriate config profile to use
(containing ifconfig addresses, route
Quoted 2 lines
Quoted 2 lines
statements, etc.)
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Or the handshaking could be done by
passing a configuration string in the
Quoted 1 line
Quoted 1 line
TLS payload, similar to the string now
built by
options_string().Quoted 3 lines
Quoted 3 lines
> This way I have been able to keep > those well tested procedures and
protocol
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
> of openvpn untouched. >
> I still have some questions
unsolved like
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
> DoS protection, dropping root
priviledges
Quoted 85 lines
Quoted 85 lines
Quoted 3 lines
Quoted 3 lines
> and how to handel SIGUSR1 and SIGHUP.
Maybe keep track of all children, so
when the master process gets a signal,
Quoted 1 line
Quoted 1 line
it dispatches it to each child process,
then to itself.
Quoted 14 lines
Quoted 14 lines
> I hope I can overcome these and mail > you a patch. > > > > > Sampo > > > > > Hi Michael, > > > > Right now OpenVPN doesn't support aforking-server model on a single
Quoted 2 lines
Quoted 2 lines
port,
> > it's strictly peer-to-peer with anOpenVPN process instantiated at both
Quoted 2 lines
Quoted 2 lines
ends
> > of the connection, and eachconnection on a unique port.
Quoted 2 lines
Quoted 2 lines
> >
> > There has been some recentdiscussions about a forking-server
Quoted 2 lines
Quoted 2 lines
implementation
> > on this list -- see the "add aserver feature to openvpn to share udp
Quoted 1 line
Quoted 1 line
> > ports?" thread in the openvpn-devel
archives.
Quoted 2 lines
Quoted 2 lines
> >
> > I think the simplest way to do thiswould be something like:
Quoted 2 lines
Quoted 2 lines
> > > > (1) Add a --forking-server flag thatcauses the main OpenVPN event loop
Quoted 2 lines
Quoted 2 lines
to
> > fork a new process for each initialdatagram received from a client.
Quoted 1 line
Quoted 1 line
> > (2) The newly forked server process
switches to a dynamic port before
Quoted 1 line
Quoted 1 line
> > responding back to the connecting
client. This is quite a bit simpler
Quoted 2 lines
Quoted 2 lines
and
> > more efficient than trying to runall clients over the same UDP port.
Quoted 1 line
Quoted 1 line
> > (3) OpenVPN already has code (see
the implementation of --float) that
Quoted 2 lines
Quoted 2 lines
will
> > adapt to the new port numberreturned by the response to initial
Quoted 2 lines
Quoted 2 lines
datagram
> > sent from server to client. I havealso confirmed that this type of UDP
Quoted 1 line
Quoted 1 line
> > port switch is recognized by both
Linux and Cisco stateful firewalls.
Quoted 2 lines
Quoted 2 lines
> >
> > There are a some complications thatwould need to be handled:
Quoted 2 lines
Quoted 2 lines
> >
> > (1) You would need to protectagainst DoS attacks that flood the server
Quoted 2 lines
Quoted 2 lines
with
> > fork requests. Possibly somevariation of --tls-auth that would
Quoted 1 line
Quoted 1 line
> > authenticate the initial packet
before the fork call.
Quoted 2 lines
Quoted 2 lines
> >
> > (2) If a client connects, getsdisconnected, then connects again, you
Quoted 2 lines
Quoted 2 lines
would
> > need to make sure that the oldserver process gets killed before a new
Quoted 3 lines
Quoted 3 lines
> > server process is forked. > >
> > Unfortunately I'm pretty busy rightnow with my day job, so I may not
Quoted 2 lines
Quoted 2 lines
get to
> > this for a while. If you want totake a shot at some kind of
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line
> > implementation, I will do my best to
answer your questions.
Quoted 6 lines
Quoted 6 lines
> >
> > Best Regards,
> > James
> >
> > ----- Original Message ----- > > From: "Michael Grigoriev"
<[email protected]...>
Quoted 41 lines
Quoted 40 lines
Quoted 3 lines
Quoted 3 lines
> > To: <[email protected]...> > > Sent: Monday, July 22, 2002 6:53 PM > > Subject: [Openvpn-devel] MultipleVPN connections on the same port
Quoted 4 lines
Quoted 4 lines
> >__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now!http://channels.netscape.com/ns/browsers/download.jsp
Quoted 2 lines
Quoted 2 lines
Get your own FREE, personal Netscape Mail account today at
Quoted 24 lines
Quoted 12 lines
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel