ssh tunneling problem
Alexandros Papadopoulos
apapadop at alumni.carnegiemellon.edu
Thu Jul 22 15:45:01 EEST 2004
On Thursday 22 July 2004 15:00, Giannis Tsopokis wrote:
> xrhsimopoio ssh gia na kano port forwarding se sygkekrimenh porta. To
> problhma pou exo einai to ekshs: eno sto localhost akouei kanonika o
> ssh bazontas thn ip toy mhxanhmatos h to onoma den akouei sthn porta.
>
> xrhsimopoio thn entolh ssh -L 1521:machine:1521 account at mymachine
$man ssh
...
-L port:host:hostport
Specifies that the given port on the local (client)
host is to be forwarded to the given host and port on
the remote side. This works by allocating a socket to
listen to port on the local side, and whenever a con-
nection is made to this port, the connection is for-
warded over the secure channel, and a connection is
made to host port hostport from the remote machine.
Port forwardings can also be specified in the configu-
ration file. Only root can forward privileged ports.
IPv6 addresses can be specified with an alternative
syntax: port/host/hostport.
Synepws, etsi einai sxediasmeno na douleyei. An 8es na mh les sta
programmata sou na xrhsimopoioun th local port gia na kanoun tis
syndeseis tous sto remote mhxanhma, grapse ena rule me to netfilter gia
na sto kanei transparently.
Gia na steileis px ola ta browser requests sou (ypo8etoume oti ola pane
pros port 80/tcp) mesa apo to tounel pou akouei sth topikh porta 1234
kaneis kati tou styl:
iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to-port 1234
...mono pou 8es to swsto syntax gia na douleyei :-)
-A
More information about the Linux-greek-users
mailing list