Content-type: text/html
Man page of tcprelay
tcprelay
Section: User Commands (1)
Updated: version 1.3.2
Index
Return to Main Contents
NAME
- tcprelay - a program to redirect TCP connections
-
SYNOPSIS
- tcprelay -s server[:port] [-p port] [OPTIONS]...
-
DESCRIPTION
- tcprelay relays TCP traffic between a server and a client, logging all
-
data exchanged in between.
- Can manage multiple sessions in parallel since version 1.3.
-
OPTIONS
- -h, --help
-
Display a quick help screen and exit.
- -v --version
-
Display version information and exit.
- -s, --server server
-
Connect to server when an incoming connection is received on
the listening port. Can also be written server:port to specify the
port to connect to (by default, it is the listening port.)
- -m, --mirror
-
Run in mirror mode. Simply send back received bytes to the client.
Assumed if -s option is not used.
- -p, --listen-port port
-
Listen on port to accept incoming connections.
- -r, --run-once
-
Relay one connection and when it is finished, exit instead of
re-entering listen mode to accept incoming connections.
- -t, --telnet
-
Assume traffic is telnet-style and output log accordingly. Without this
option, the traffic is logged in binary form (hex code of characters is
displayed), with this option, lines are written. It is useful to log
traffic of telnet-style protocols like SMTP, POP3, and so on.
By default, the traffic is expected to be raw binary (no telnet-style.)
- -b, --buf-size size
-
Sets the network traffic bufer size to size in bytes. 10,000 by
default.
- --timeout duration
-
Sets the connection timeout to duration, in seconds. 5 by default.
- --ip-as-port
-
Use last byte of IP to form source port when connecting to server: try up to
252 times using this formula (where ipa is the last IP byte): p = 1024 + (256
* n) + ipa.
- --connexe
-
Fork an external program for every new connection. Command will have client IP
address passed as argment
- -V, --verbose
-
Be more talkative.
- --minimal-log
-
Don't log data, only connection info.
- -q, --quiet
-
Be less talkative.
- -l, --log-file file
-
Write the log in file. tcprelay.log (in current working directory)
by default.
- --rotate-log
-
Rotate log files, adding .[1..n] to the log name (before extension)
and cycling through files. Off by default.
.1 is the most recent file in the rotation, .n the oldest.
With the default number of log files (7, see --rotate-log-nb-files
below) and the default log name (tcprelay.log, see -l above), each log
rotation works this way:
tcprelay.7.log is deleted
tcprelay.6.log is renamed as tcprelay.7.log
tcprelay.5.log is renamed as tcprelay.6.log
...
tcprelay.1.log is renamed as tcprelay.2.log
tcprelay.log is renamed as tcprelay.1.log
tcprelay.log is recreated
Each log file has a size (in average) close to
(rotate-log-size-kb / (rotate-log-nb-files + 1))
=> by default, 10MB / 8 = 1.25MB
The rotation occurs at the time tcprelay.log
reaches this average size.
- --rotate-log-size-kb
-
Total size of log files in Kilo-bytes while rotating logs. 10240 by default (10MB).
Implies --rotate-log
- --rotate-log-nb-files
-
Number of files to cycle through while rotating logs. 7 by default.
Implies --rotate-log
- -n, --nodisplay-log
-
Don't output the log on the screen. Done by default.
INITIALIZATION FILES
- None.
-
AUTHOR
- Written by Sébastien Millet <sebastien.millet1@club-internet.fr>.
-
- Multisession and some other features by Warren Downs <Warren@choggiung.com>.
-
- Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 published by the Free Software Foundation.
-
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- INITIALIZATION FILES
-
- AUTHOR
-
This document was created by
man2html,
using the manual pages.
Time: 20:19:32 GMT, April 17, 2014