



____________________________________________________________________________
Relay TCP v 1.01 Command Line tool
Socket Forwarder
DLC Sistemas 2000











____________________________________________________________________________
What is Relay TCP

Relay TCP is a program that allows redirection of TCP/IP sockets stream data to 
a specific IP address and port.

It works like a repeater that gets all data received by the origin port and 
sends it to the destination. 
____________________________________________________________________________
Program versions

There is two versions that have basically the same functionality:

* Relay TCP (RELAYTCP.EXE)
* Relay TCP Service (RETCPSVC.EXE)

Relay TCP is a command line tool that allows to relay from a single port and 
redirect all data to a remote IP and port.

Relay TCP Service is a Service for Windows NT 4.0 and 2000 that allows to listen 
and redirect from multiple ports and redirect data as explained.

Both are 32 bits Windows versions, but Relay TCP is only for NT.

____________________________________________________________________________
RelayTCP command line tool

Relay TCP is a command line tool that allows to relay from a single port and 
redirect all data to a remote IP and port.

____________________________________________________________________________
Installation

Is a unique file RELAYTCP.EXE that has no installation. Simply use it as a 
command line tool.
____________________________________________________________________________
Usage

From a Win32 command prompt, you can execute RELAYTCP  by using:

RELAYTCP listenPort remoteIP remotePort [-d]

Where 

ListenPort   Is the local port where RELAYTCP will listen to accept 
             connections. This port must be not used in order to open 
             the listening socket
remoteIP     Is the IP address in name or number format that will be the 
             destination of the data received by the other side connection
remotePort   Is the port where RELAYTCP will try to open the connection and 
             send/receive data
-d           Is optional. With this flag the program will log all the data 
             transmited from both sides and recorded in formatted files, a file 
             for each connection

____________________________________________________________________________
An example

We want to send mail to the SMTP service (port 25) at 10.3.100.14.
We cannot access directly because we have no route to there, but there is a 
multihomed Windows 95 with IPs 192.15.1.10  and 10.3.100.12 that can.
We can just execute RELAYTCP command line in that box in the following form:

RELAYTCP 25 10.3.100.14 25

Or, if we desire another origin port (i.e. port 1000), 
RELAYTCP 1001 10.3.100.14 25

Then we will get a message like:

RelayTCP v1.0 - Relay of TCP/IP sessions
(C) DLC Sistemas 2000 - www.dlcsistemas.com
Listening on port 1001
Ready to relay data to 10.3.100.14:25
[ESC to cancel]

We can now connect to 1001 of the 192.15.1.10 box and we will get the SMTP 
service of 10.3.100.14

Note that this multihomed host can accept connections on port 1001 from 
192.x.x.x and 10.x.x.x clients.

To stop, just press ESC key. Then the utility will stop:

RelayTCP v1.01 - Relay of TCP/IP sessions
(C) DLC Sistemas 2000 - www.dlcsistemas.com
Listening on port 1001
Ready to relay data to 10.3.100.14:25
Closing connections...
It's all !

____________________________________________________________________________
Error Events

There can appear some errors that we'll try to describe:

* Not bound to port !
Is shown when the local port assigned to listen is used by another application 
or system. Use another port

* I can't resolve XXXX
Is shown when the IP name address XXXX  couldn't be resolved by any DNS or hosts 
file. Try to do ping on this address to test what's happend

* Fatal Error: No socket support seem to be installed. :-(
When the operating system has not the TCP/IP protocol installed or there is any 
kind of problem with the version of winsock

* Fatal Error: No resources were assigned to the process :-(
That's when the program cannot get memory from the OS and open objects

* Fatal Error: Thread not allowed to begin :-(
That is when the thread resources of the OS have been exhausted


____________________________________________________________________________
Data logging

When -d option is set, RELAYTCP will log all data transferred between peers and 
formatted in hexa and ascii data.

Each established connection will be logged in a file in the current working 
directory.
The use of this option is recommended only for debugging purposes. Extensive use 
of this functionality could affect performance and free disk space.

____________________________________________________________________________
Data Logging

When parameter Debug is set to "1" in the registry (activated), each established 
connection will be logged in a file at the Log Directory. The format of the file 
is

RLyymmddhhttnn.LOG

Where
Yy         Two last digits of the current year
Mm         Current month
Dd         Current day
Hh         Current hour
Tt         Current minute
Nn         A random number to set file as unique

The use of this option is recommended only for debugging purposes. Extensive use 
of this functionality could affect performance and free disk space.

____________________________________________________________________________
Terms of Use

RelayTCP 1.01 - Socket forwarder
RelayTCPsvc 1.01 - Socket forwarder service
Jose Maria Jimenez de la Concepcion
admin@dlcsistemas.com 
(c) DLC Sistemas 2000

BY USING THIS SOFTWARE YOU ARE CONSENTING TO BE BOUND BY THIS AGREEMENT:

RelayTCP and RelayTCPsvc are free software.
RelayTCP and RelayTCPsvc may be freely distributed and used subject to the 
following terms:

* You may NOT modify or translate the executable files or help files provided.
* You may NOT sell this software. This utility is free.
* You may NOT distribute any component of RelayTCP as a part of any commercial 
package.

This program is distributed in the hope that it will be useful, but WITHOUT ANY 
WARRANTY. Under no circumstances and under no legal theory, contract or 
otherwise shall DLC sistemas or the author be liable to you or any other person 
for any indirect, special, incidental or consequential damages of any character. 
There is no warranty for damages of any type caused by using this application. 

You may find the latest version of Relay TCP at DLC Sistemas home page:
http://www.dlcsistemas.com

Feel free to tell what you think about the program to the author.
Comments and Suggestions are well, well appreciated.

You can contact the author by email :  relaytcp@dlcsistemas.com

