bin/171882: incorrect port fowarding with server allocated port
HIROSHI OOTA
nil at mad.dog.cx
Sun Sep 23 02:40:09 UTC 2012
>Number: 171882
>Category: bin
>Synopsis: incorrect port fowarding with server allocated port
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Sep 23 02:40:08 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: HIROSHI OOTA
>Release: 10-current
>Organization:
>Environment:
FreeBSD xxx 10.0-CURRENT FreeBSD 10.0-CURRENT #165 r233752: Sun Apr 1 15:27:13 JST 2012 root amd64
>Description:
SSH standard supports server allocated port.
We can use the capability the ssh option -R 0:host:hostport.
But, I specify it multiple, all port would be fowarded to the first port.
>How-To-Repeat:
term1$ ssh -v -R 0:localhost:23 -R 0:localhost:25 -R 0:127.0.0.1:80 -N
debug1: remote forward success for: listen 0, connect 127.0.0.1:21
Allocated port 41791 for remote forward to 127.0.0.1:21
debug1: remote forward success for: listen 0, connect 127.0.0.1:25
Allocated port 23513 for remote forward to 127.0.0.1:25
debug1: remote forward success for: listen 0, connect 127.0.0.1:80
Allocated port 59246 for remote forward to 127.0.0.1:80
term2$ telnet localhost 23513
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 xxx FTP server (Version xxx) ready.
term2$ telnet localhost 59246
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 xxx FTP server (Version xxx) ready.
these ports should be forwaded to 25(smtp) and 80(http), not 21(ftp).
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list