473,396 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

TCP thru UDP?

I have a constant UDP connection from one office to another office. I use
it for an in-house application and it works just fine.

But, I want to add file transfer to my little app without requiring another
port be opened on the firewall and I don't want to reinvent the TCP wheel.

Is there a way to tunnel TCP through my existing UDP connection and take
advantage of the packet checks that TCP offers for transfering files?

Oct 14 '06 #1
13 3556
Usually within LAN that be OK, TFTP ( UDP base ) work pretty nice for LANs,
but if you "reinvent the TCP wheel"
you need to use TCP, otherwise you can use 3-th party s/w which did that :)
Arkady

"smerf" <sm***@shroom.comwrote in message
news:Ms******************@bignews6.bellsouth.net.. .
>I have a constant UDP connection from one office to another office. I use
it for an in-house application and it works just fine.

But, I want to add file transfer to my little app without requiring
another port be opened on the firewall and I don't want to reinvent the
TCP wheel.

Is there a way to tunnel TCP through my existing UDP connection and take
advantage of the packet checks that TCP offers for transfering files?

Oct 14 '06 #2
smerf wrote:
Is there a way to tunnel TCP through my existing UDP connection and take
advantage of the packet checks that TCP offers for transfering files?
Have a look at http://gray-world.net/pr_cctt.shtml

They say it can tunnel TCP inside UDP. I've not tested that.
There should be other tools that can do.

Cheers,
Armin

Oct 14 '06 #3
In article <Ms******************@bignews6.bellsouth.net>,
"smerf" <sm***@shroom.comwrote:
I have a constant UDP connection from one office to another office. I use
it for an in-house application and it works just fine.

But, I want to add file transfer to my little app without requiring another
port be opened on the firewall and I don't want to reinvent the TCP wheel.

Is there a way to tunnel TCP through my existing UDP connection and take
advantage of the packet checks that TCP offers for transfering files?
How does this avoid opening another port on the firewall? You'll need
to open the port that's used for the TCP-over-UDP protocol, since it
will be different from whatever port you're using for your "constant UDP
connection" (I have no idea what you mean by that, BTW).

--
Barry Margolin, ba****@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
Oct 15 '06 #4
In article <Ms******************@bignews6.bellsouth.net>,
smerf <sm***@shroom.comwrote:
>I have a constant UDP connection from one office to another office. I use
it for an in-house application and it works just fine.
>But, I want to add file transfer to my little app without requiring another
port be opened on the firewall and I don't want to reinvent the TCP wheel.
>Is there a way to tunnel TCP through my existing UDP connection and take
advantage of the packet checks that TCP offers for transfering files?
Yeh, you could do it, but the bother would be relatively high.
You'd probably find it a lot easier to just adapt one of the old
modem file transfer protocols such as x-modem.
Oct 15 '06 #5

"Barry Margolin" <ba****@alum.mit.eduwrote in message
news:ba**************************@comcast.dca.giga news.com...
In article <Ms******************@bignews6.bellsouth.net>,
"smerf" <sm***@shroom.comwrote:
>I have a constant UDP connection from one office to another office. I
use
it for an in-house application and it works just fine.

But, I want to add file transfer to my little app without requiring
another
port be opened on the firewall and I don't want to reinvent the TCP
wheel.

Is there a way to tunnel TCP through my existing UDP connection and take
advantage of the packet checks that TCP offers for transfering files?

How does this avoid opening another port on the firewall? You'll need
to open the port that's used for the TCP-over-UDP protocol, since it
will be different from whatever port you're using for your "constant UDP
connection" (I have no idea what you mean by that, BTW).
I simply mean that there is a UDP port open on PC1 and another UDP port open
on PC2 and that they are available and the apps hosting them are aware that
they are available for data transfer betwen the 2 PCs.

I don't have access to the other firewall, and may not be able to get the
admin to open an external TCP port without a tremendous gnashing of teeth
and perhaps some boils and a plague or two. So, I thought, why not tunnel
the TCP connections thru the UDP ports?

The idea here is similar to the Hamachi VPN solution (which LogMeIn
purchased and does not release the server code for). See
http://www.realvnc.com/pipermail/vnc...ry/053895.html for a
short description of how Hamachi encapsulated TCP in UDP.

I don't really understand all of what is needed to accomplish that. I
assume the Hamachi solution used an ethernet driver of some sort and simply
relayed the data sent to it to the other end of the tunnel via the UDP used
to get thru the firewalls and NATs.

Well, I can't code a device driver yet (no C++ skills), so I thought I might
be able to aim the TCP connections through my UDP tunnel.

Any ideas? I am looking into using WinPcap to sniff the packets on the
network and send them thru the UDP tunnel, but that may result in packets
being split (according to the referenced article) - and nobody wants split
packets.

The only WinPcap that I have found to use is wrapped in an activex control.
But, won't COM interop really screw with the speed if I do something like
this via an activex component from .Net?

Then there is the encrpytion of the data stream between the endpoints -
something I haven't even bothered to tackle at this point.

Does encryption + COM interop = too damned slow to bother with?
Oct 15 '06 #6
Thanks for the idea.

While researching it, the damndest thing happened. I thought of a simple
way to do file transfer via UDP. It involves my own little
protocol....small and simple but possibly more verbose than the TCP
protocols - so speed may suffer.

Now, I am on a hunt to enable other apps to work thru my little UDP tunnel -
like Remote Desktop or VNC or Video Conferencing etc..

To do this, I still need to find the best way to make my UDP connection on
each end act as a connecting point between the PCs. They would essentially
be TCP Proxies for any app that required a TCP connection.

Any ideas?
"Walter Roberson" <ro******@hushmail.comwrote in message
news:b9jYg.139987$1T2.115593@pd7urf2no...
In article <Ms******************@bignews6.bellsouth.net>,
smerf <sm***@shroom.comwrote:
>>I have a constant UDP connection from one office to another office. I use
it for an in-house application and it works just fine.
>>But, I want to add file transfer to my little app without requiring
another
port be opened on the firewall and I don't want to reinvent the TCP wheel.
>>Is there a way to tunnel TCP through my existing UDP connection and take
advantage of the packet checks that TCP offers for transfering files?

Yeh, you could do it, but the bother would be relatively high.
You'd probably find it a lot easier to just adapt one of the old
modem file transfer protocols such as x-modem.

Oct 15 '06 #7
In article <3L*******************@bignews5.bellsouth.net>,
smerf <sm***@shroom.comwrote:
>Now, I am on a hunt to enable other apps to work thru my little UDP tunnel -
like Remote Desktop or VNC or Video Conferencing etc..
>To do this, I still need to find the best way to make my UDP connection on
each end act as a connecting point between the PCs. They would essentially
be TCP Proxies for any app that required a TCP connection.
It'd be a small modification to any gre encapsulator.
Oct 15 '06 #8
There is one problem that I just thought of with the WinPcap solution.....IP
resolution. You couldn't just send all packets for IP 192.168.1.101 (for
instance) from your network to the other network.

What of they weren't using the 192- range? Or what if they were and your
internal calls to the 192.168.1.101 PC on your network were sent to the same
IP on thier network?

No....the WinPcap solution is a little too simple.

Hamachi uses a Hamachi Network Interface to connect to the IPV4 5.0.0.0/8
VPN addresses. So, I guess I have to learn device driver coding in C++
now......yeah, right.

Hamachi also uses the 5.0.0.0/8 Ip range that is unassigned by ICANN, but is
routable over the internet.

The problem with this little scheme is that the 5.0.0.0/8 IP range will hold
only 16,000,000 IPs. That means that only 16,000,000 PCs can use the
Hamachi network. The 5.0.0.0/8 IP range is also reserved by ICANN for
future use. So, when the next Gates wannabe starts using the 5.0.0.0/8 IPs,
Hamachi users are in for a wild ride.

Sure, Hamachi could change to IPV6 and have plenty of IP adresses. In fact,
this is exactly (IMHO) what LogMeIn was thinkgin when they bought Hamachi.
Transfering the IPV4 addresses would be a nightmare. LogMeIn will simply
say that the IPV4 was a BETA and now you have to pay a monthly fee to use
Hamachi on the new IPV6 addresses assigned to them by ICANN.

It's coming...just wait. That's why we need a free version of just such a
tool.

There has to be a simpler way to connect PCs in a networked fashion than
using a device driver like Hamachi does.

Well......time to sleep on it.
"smerf" <sm***@shroom.comwrote in message
news:sD******************@bignews5.bellsouth.net.. .
>
"Barry Margolin" <ba****@alum.mit.eduwrote in message
news:ba**************************@comcast.dca.giga news.com...
>In article <Ms******************@bignews6.bellsouth.net>,
"smerf" <sm***@shroom.comwrote:
>>I have a constant UDP connection from one office to another office. I
use
it for an in-house application and it works just fine.

But, I want to add file transfer to my little app without requiring
another
port be opened on the firewall and I don't want to reinvent the TCP
wheel.

Is there a way to tunnel TCP through my existing UDP connection and take
advantage of the packet checks that TCP offers for transfering files?

How does this avoid opening another port on the firewall? You'll need
to open the port that's used for the TCP-over-UDP protocol, since it
will be different from whatever port you're using for your "constant UDP
connection" (I have no idea what you mean by that, BTW).

I simply mean that there is a UDP port open on PC1 and another UDP port
open on PC2 and that they are available and the apps hosting them are
aware that they are available for data transfer betwen the 2 PCs.

I don't have access to the other firewall, and may not be able to get the
admin to open an external TCP port without a tremendous gnashing of teeth
and perhaps some boils and a plague or two. So, I thought, why not tunnel
the TCP connections thru the UDP ports?

The idea here is similar to the Hamachi VPN solution (which LogMeIn
purchased and does not release the server code for). See
http://www.realvnc.com/pipermail/vnc...ry/053895.html for a
short description of how Hamachi encapsulated TCP in UDP.

I don't really understand all of what is needed to accomplish that. I
assume the Hamachi solution used an ethernet driver of some sort and
simply relayed the data sent to it to the other end of the tunnel via the
UDP used to get thru the firewalls and NATs.

Well, I can't code a device driver yet (no C++ skills), so I thought I
might be able to aim the TCP connections through my UDP tunnel.

Any ideas? I am looking into using WinPcap to sniff the packets on the
network and send them thru the UDP tunnel, but that may result in packets
being split (according to the referenced article) - and nobody wants split
packets.

The only WinPcap that I have found to use is wrapped in an activex
control. But, won't COM interop really screw with the speed if I do
something like this via an activex component from .Net?

Then there is the encrpytion of the data stream between the endpoints -
something I haven't even bothered to tackle at this point.

Does encryption + COM interop = too damned slow to bother with?


Oct 15 '06 #9

"Walter Roberson" <ro******@hushmail.comwrote in message
news:qRjYg.140139$1T2.99878@pd7urf2no...
In article <3L*******************@bignews5.bellsouth.net>,
smerf <sm***@shroom.comwrote:
>>Now, I am on a hunt to enable other apps to work thru my little UDP
tunnel -
like Remote Desktop or VNC or Video Conferencing etc..
>>To do this, I still need to find the best way to make my UDP connection on
each end act as a connecting point between the PCs. They would
essentially
be TCP Proxies for any app that required a TCP connection.

It'd be a small modification to any gre encapsulator.
Thanks for the pointer. hadn't heard of gre encapsulation before. The only
thing I'll have to look into is how to make sure the TCP packets aren't too
large when wrapped. This may not be a problem, but I'll have to look more
into it to be sure.

Well, bedtime for smerf. I'll be dreaming about this crap all night. :)

I'll continue with what I find tomorrow.
Oct 15 '06 #10
Hello,

smerf a écrit :
I have a constant UDP connection from one office to another office. I use
it for an in-house application and it works just fine.

But, I want to add file transfer to my little app without requiring another
port be opened on the firewall and I don't want to reinvent the TCP wheel.

Is there a way to tunnel TCP through my existing UDP connection and take
advantage of the packet checks that TCP offers for transfering files?
Use a tunnel that runs over UDP, such as OpenVPN. Then you can tranport
any kind of IP traffic including TCP inside the tunnel.
Oct 15 '06 #11
OpenVPN requires Admin login to at least setup initially. My users may not
have that capability.
"Pascal Hambourg" <bo**********@plouf.fr.eu.orgwrote in message
news:eg**********@biggoron.nerim.net...
Hello,

smerf a écrit :
>I have a constant UDP connection from one office to another office. I
use it for an in-house application and it works just fine.

But, I want to add file transfer to my little app without requiring
another port be opened on the firewall and I don't want to reinvent the
TCP wheel.

Is there a way to tunnel TCP through my existing UDP connection and take
advantage of the packet checks that TCP offers for transfering files?

Use a tunnel that runs over UDP, such as OpenVPN. Then you can tranport
any kind of IP traffic including TCP inside the tunnel.

Oct 15 '06 #12
In article <sD******************@bignews5.bellsouth.net>,
"smerf" <sm***@shroom.comwrote:
"Barry Margolin" <ba****@alum.mit.eduwrote in message
news:ba**************************@comcast.dca.giga news.com...
In article <Ms******************@bignews6.bellsouth.net>,
"smerf" <sm***@shroom.comwrote:
I have a constant UDP connection from one office to another office. I
use
it for an in-house application and it works just fine.

But, I want to add file transfer to my little app without requiring
another
port be opened on the firewall and I don't want to reinvent the TCP
wheel.

Is there a way to tunnel TCP through my existing UDP connection and take
advantage of the packet checks that TCP offers for transfering files?
How does this avoid opening another port on the firewall? You'll need
to open the port that's used for the TCP-over-UDP protocol, since it
will be different from whatever port you're using for your "constant UDP
connection" (I have no idea what you mean by that, BTW).

I simply mean that there is a UDP port open on PC1 and another UDP port open
on PC2 and that they are available and the apps hosting them are aware that
they are available for data transfer betwen the 2 PCs.
I assume these ports are open through the firewall because you're
already running an application that uses them. If so, you can't use the
same port for your tunnel, because the PC's won't be able to tell
whether a packet is for the application or for the tunnel.

--
Barry Margolin, ba****@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
Oct 16 '06 #13

"Barry Margolin" <ba****@alum.mit.eduwrote in message
news:ba**************************@comcast.dca.giga news.com...
In article <sD******************@bignews5.bellsouth.net>,
"smerf" <sm***@shroom.comwrote:
>"Barry Margolin" <ba****@alum.mit.eduwrote in message
news:ba**************************@comcast.dca.gig anews.com...
In article <Ms******************@bignews6.bellsouth.net>,
"smerf" <sm***@shroom.comwrote:

I have a constant UDP connection from one office to another office. I
use
it for an in-house application and it works just fine.

But, I want to add file transfer to my little app without requiring
another
port be opened on the firewall and I don't want to reinvent the TCP
wheel.

Is there a way to tunnel TCP through my existing UDP connection and
take
advantage of the packet checks that TCP offers for transfering files?

How does this avoid opening another port on the firewall? You'll need
to open the port that's used for the TCP-over-UDP protocol, since it
will be different from whatever port you're using for your "constant
UDP
connection" (I have no idea what you mean by that, BTW).

I simply mean that there is a UDP port open on PC1 and another UDP port
open
on PC2 and that they are available and the apps hosting them are aware
that
they are available for data transfer betwen the 2 PCs.

I assume these ports are open through the firewall because you're
already running an application that uses them. If so, you can't use the
same port for your tunnel, because the PC's won't be able to tell
whether a packet is for the application or for the tunnel.
Another usenet user turned me on to a way that this can be accomplished.
Check out gre encapsulation at
http://en.wikipedia.org/wiki/Generic..._Encapsulation.

It's not exactly a VPN, but it'll do nicely for file transfers and such.
Oct 16 '06 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Eric Martin | last post by:
Hello, Does anyone know of a way to loop thru a SQL table using code in a stored procedure? I need to go thru each record in a small table and build a string using values from the fields...
1
by: Jeremy Langworthy | last post by:
Hi I have a dynamicly generated form (well the elements are at least) that looks something like this: while( not end of returned records): <input name="plan_id" type="checkbox" id=""...
1
by: Roger | last post by:
Are these two features available in VS.Net 2003 at all (maybe different keys)... F4 to go thru find-in-files search results (just like you F4 to go thru build errors). In VC6, if output window...
13
by: Xah Lee | last post by:
the Journey of Foreign Characters thru Internet Xah Lee, 20051101 There's a bunch of confusions about the display of non-ascii characters such as the bullet "•". These confusions are...
4
by: Thiru | last post by:
Hi, I have a UDB 8.1 (Fixpak 5)running on Window 2000 Server. Is it possible to access db thru telnet? Configuring it thru db2ca is another ways. But some commands like db2exfmt are not available...
2
by: sparks | last post by:
I was going to loop thru the tables and change some properties. 10 <<<<<< prp.value --prp.name = Type False <<<<prp.value --prp.name = allow zero length 10 <<<<<< prp.value --prp.name = Type...
8
by: Tcs | last post by:
I've been stumped on this for quite a while. I don't know if it's so simple that I just can't see it, or it's really possible. (Obviously, I HOPE it IS possible.) I'm trying to get my queries...
2
by: vulcaned | last post by:
I'm thinking I might want to move the back-end to one of my Access97 applications to SQLServer instead of continuing to use Access jet but before I start/do that I have several questions I'm hoping...
6
by: BBFrost | last post by:
I'm using Net 1.1 (2003) SP1 & Windows 2000 Here's the issue ... Rows 12 thru 24 are selected in a datagrid. The user now unselects rows 12 thru 24 and selects rows 45 thru 70 ??? How can...
3
by: Abhishek | last post by:
Hi! Everyone I have a small issue, if anyone could help me out I need to upload user files to my website thru my web application. something similar to attaching a file to the mail. I know one...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.