MIME-Version: 1.0 In-Reply-To: References: <4AE8A8A4.1040102@...1270...> From: Lucas Mocellin Date: Mon, 11 Jan 2010 17:43:04 -0200 Message-ID: Content-Type: multipart/alternative; boundary=001636c5bd341b2398047ce8c071 Subject: Re: [Openvpn-devel] How to check is OpenVPN port is open List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: openvpn-devel --001636c5bd341b2398047ce8c071 Content-Type: text/plain; charset=ISO-8859-1 Hello, again I fell in this problem, I must solve this now, so if someone has a better idea than trying to reproduce the OpenVPN protocol begin and see if there is any answer, I will have to figure out how to send the OpenVPN protocol by UDP manually. I would like to see if there is a simpler manner to check if OpenVPN is listenning and accepting connections. any help is welcome. Thanks in advance, Lucas. On Thu, Oct 29, 2009 at 9:41 AM, Lucas Mocellin wrote: > Hi again, > > I forgot to say that I'm working with UDP, and all the problem is around > this protocol connectionless. > > I tried to sniff and redo the "connection start", but always the packages > are different but actually, I didn't figured it out completely, and probably > I won't studi the OpenVPN protocol deeply right now for that. > > ngrep: > # > U 2009/10/29 09:33:07.954515 192.168.9.129:57691 -> 192.168.9.127:1194 > 8..Rao.T.......... > # > U 2009/10/29 09:33:07.955865 192.168.9.127:1194 -> 192.168.9.129:57691 > > @6..............Rao.T..... > > # > U 2009/10/29 09:33:07.956913 192.168.9.129:57691 -> 192.168.9.127:1194 > > (..Rao.T......6....... > > > the first packet always start with an "8" and has a fixed lenght of 18 > characters: > 8.....7U.......... > 8..XyR............ > 8......h.......... > > but I don't know if I just can send this "info" like a string creating a > UDP socket, I tried and it didn't work, maybe some mistake, I can try again. > > I can't just start an OpenVPN because I don't have the key yet, this > verification is done before the OpenVPN connection. > > I got this from another FORUM: > "The trouble with verifying UDP ports as open is that if a UDP port is > open, you get no response from it. That's also the case when it's > filtered of course. " > > I understand but not at all, if there is no response, there is no > communication.. hehe > > another manner of how to check if an OpenVPN UDP port is open? > > Thanks for the answers folks! > > Lucas. > > > On Wed, Oct 28, 2009 at 6:25 PM, Yevgeny Kosarzhevsky wrote: > >> Hi, >> >> >> Lucas Mocellin wrote: >> >>> Hi all, >>> >>> briefly: I'm helping in the development of an educational software to >>> apply online tests. The client will connect to the server through OpenVPN to >>> perform the test. I would like to check if the OpenVPN port is alive and >>> accepting connections (check if there is port filtering, and so on.. ). >>> >>> I'm programming in python. >>> >>> Does someone know to achieve that? I'm trying to create a socket and send >>> any message to the server, but no response, is there any kind of "hello" or >>> something like this? >>> >> >> You can test it with netcat utility which is run on the server in listen >> mode and on client in client mode. >> > > --001636c5bd341b2398047ce8c071 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Hello,

again I fell in this problem, I must solve this now, so if so= meone has a better idea than trying to reproduce the OpenVPN protocol begin= and see if there is any answer, I will have to figure out how to send the = OpenVPN protocol by UDP manually.

I would like to see if there is a simpler manner to check if OpenVPN is= listenning and accepting connections.

any help is welcome.

T= hanks in advance,

Lucas.

On Thu, O= ct 29, 2009 at 9:41 AM, Lucas Mocellin <lucasmocellin@...277...> wrote:<= br>
Hi again,

= I forgot to say that I'm working with UDP, and all the problem is aroun= d this protocol connectionless.

I tried to sniff and redo the "connection start", but always = the packages are different but actually, I didn't figured it out comple= tely, and probably I won't studi the OpenVPN protocol deeply right now = for that.

ngrep:
#
U 2009/10/29 09:33:07.954515 192.168.9.129:57691 -> 192.168.9.127:1194
=A0 8..R= ao.T..........
#
U 2009/10/29 09:33:07.955865 192.168.9.127:1194 -> 192.168.9.129:57691
=A0 @6..............Rao.T.....=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0
#
U 2009/10/29 09:33:07.956913 192.168.9.129:57691 -= > 192.168.9.127:= 1194
=A0 (..Rao.T......6.......=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0

the first packet always = start with an "8" and has a fixed lenght of 18 characters:
8..= ...7U..........
8..XyR............
8......h..........

but I don't know if I j= ust can send this "info" like a string creating a UDP socket, I t= ried and it didn't work, maybe some mistake, I can try again.

I can't just start an OpenVPN because I don't have the key yet, thi= s verification is done before the OpenVPN connection.

I got this fro= m another FORUM:
"The trouble with verifying UDP ports as open is t= hat if a UDP port is
open, you get no response from it. =A0That's also the case when it'= ;s
filtered of course. "

I understand but not at all, if t= here is no response, there is no communication.. hehe

another manner= of how to check if an OpenVPN UDP port is open?

Thanks for the answers folks!

Lucas.


On = Wed, Oct 28, 2009 at 6:25 PM, Yevgeny Kosarzhevsky <yevg@...1270...><= /span> wrote:
Hi,


Lucas Mocellin wrote:
Hi all,

briefly: I'm helping in the development of an educational software to a= pply online tests. The client will connect to the server through OpenVPN to= perform the test. I would like to check if the OpenVPN port is alive and a= ccepting connections (check if there is port filtering, and so on.. ).

I'm programming in python.

Does someone know to achieve that? I'm trying to create a socket and se= nd any message to the server, but no response, is there any kind of "h= ello" or something like this?

You can test it with netcat utility which is run on the server in listen mo= de and on client in client mode.


--001636c5bd341b2398047ce8c071--