Rechercher une page de manuel

Chercher une autre page de manuel:


Langue: en

Version: 1999 February 14 (debian - 07/07/09)

Section: 1 (Commandes utilisateur)


forward-socket - arbitrary socket forwarding over a secure or compressed channel


[-h, --help]
[-v, --verbose]
[-V, --version]
[-p, --password password]
[-z, --gzip]
[-K, --key-size bits]


forward-socket listens on port listen_port on your local machine. When it receives a connection, it forwards this to machine1 where a secure-mcserv(1) daemon is assumed to be running. The secure-mcserv daemon then makes a connection to machine2 on port port2. All traffic is then forwarded transparently between listen_port and port2 of machine2.

The --secure and --gzip options can be used to effect the connection between listen_port of the local machine and port2 of machine2. In this way forward-socket can be used to create secure or compressed versions of any service.


All options are analogous to those of mirrordir. See mirrordir(1) for more info. --debug just prevents forward-socket from forking into the background as a daemon.


I havn't tested this, but they seem logical. Tell me if I've made a typo somewhere.

Consider a print server A on some LAN. The LAN has a masquerading server B giving that LAN internet access. B can see both the internet and A. At some other site John has a machine D using a masquerading server C to give that LAN internet access. B and C can see each other only over the open internet. He would like to run lpr on D and have it automatically print out at A. He would also like the channel between B and C to be compressed and encrypted (using a 1024 bit key exchange).

 The procedure is as follows (515 is the printer port):
     A# lpd &
     B# secure-mcserv -d -p 12345
 add an entry to ~/.netrc for the password of john on B, then
     C# forward-socket john@B:12345 A:515 515 --secure -K 1024 -z
 add an entry to /etc/printcap, defining a printer x on C, then
     D# lpr -Px mydocument

Consider Jill who doesn't like colleague John printing out screen dumps of her X session. She would like to create a secure X session between her X server A and her mainframe B.

 The procedure is as follows (6010 corresponds to display 10.0):
     A# X &
     A# secure-mcserv -d -p 12345
 add an entry to ~/.netrc for the password of jill on A, then
     B# forward-socket jill@A:12345 A:6000 6010 --secure -K 1024
     B# export DISPLAY=localhost:10.0
     B# fvwm &


Telnet logins, X sessions, printer (lpr) services, http and pop3 connections have been tested and work. Ftp connections do not forward because of the way ftp tries to do wierd binding things with sockets (?). Please tell about what else worked, although most everything should work.


See also the BUGS section of mirrordir(1).

Out of bounds (MSG_OOB of recv(2) and send(2)) data is never encrypted or compressed. It is sent unmodified in the plain text. If anyone thinks this is a security risk, please tell me about it and I'll come up with something.

Screen resizing (detection?) under rlogin(1) does not seem to work, although it works under telnet(1). This must have something to do with OOB data not being sent properly. I don't feel like debugging rlogin, rlogind, forward-socket, and secure-mcserv simultaneously to find the problem. If anyone wants to try this please go ahead.


List of machines and corresponding passwords.


mirrordir is an invention of its author and does not belong to any operating system standard.


The latest version of the program can be found at either, or


Paul Sheer <> <>


mirrordir(1), pslogin(1), ssh(1)
Si la logique est l'hygiène du mathématicien, ce n'est pas elle qui lui
fournit sa nourriture ; le pain quotidien dont il vit, ce sont les
grands problèmes.
-+- André Weil -+-