ssh port forwarding

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


Please, explain me where I'm wrong.
I have two machines with linux and FreeBSD and I desire to have a
secure tunel for HTTP between them. So I make it in the following way:

linux@lunc:~$ ssh -2 -L 1234:localhost:6661 lunc@freebsd

and afer that I tried to make following HTTP request
"http://localhost:1234/" on my linux box by Firefox browser. However, I
saw by tcpdump that http wasn't tuneled:

linux@root# tcpdump -X -s 128 -v port 6661
19:47:07.980462 IP (tos 0x0, ttl  64, id 62776, offset 0, flags [DF],
proto: TCP (6), length: 738) linux.58163 > freebsd.6661: P 1:699(698)
ack 1 win 5840
0x0000:  4500 02e2 f538 4000 4006 fb98 d5b4 da5d  E....8@.@......]
0x0010:  d5b4 c17d e333 1a05 c10f d1c5 157f a1e0  ...}.3..........
0x0020:  5018 16d0 9695 0000 4745 5420 2f69 6d61  P.......GET./ima
0x0030:  6765 732f 6172 722d 622e 6769 6620 4854  ges/arr-b.gif.HT
0x0040:  5450 2f31 2e31 0d0a 486f 7374 3a20 6172  TP/
0x0050:  632e 7961 6e64 6578 2e72 753a 3636 3631
0x0060:  0d0a 5573 6572 2d41 6765 6e74 3a20 4d6f  ..User-Agent:.Mo

netstat shows the following information:
linux@root# netstat -ap --tcp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address  Foreign Address  State  PID/Program
tcp 0 0 localhost:1234  *:*  LISTEN  10890/ssh
tcp 0 0 localhost:44995  localhost:1234  ESTABLISHED 4210/firefox-bin
tcp 0 0 localhost:1234  localhost:44995  ESTABLISHED 10890/ssh
tcp 0 0 linux:58163     freebsd:6661      ESTABLISHED  4210/firefox-bin
tcp 0 0 linux:50027     freebsd:ssh       ESTABLISHED  10890/ssh

Site Timeline