Hallo zusammen,
ich versuche über eine SOCKS proxy eine Verbindung zu einem Server aufzubauen, da dieser eine IP-Speere eingebaut hat und nur meine Proxy-IP am FTP-Port durchlässt. Den SSH proxy Verbindung baue ich wie folge auf:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # SSH SOCKS proxy Verbindung user@local_pc:~$ssh -p 12345 -D 23456 meinserver.net # Test ob ftp Verbindung prinzipiell möglich user@proxy_pc:~$ ftp 123.123.123.123 Connected to 123.123.123.123. 220 (vsFTPd 2.3.2) Name (123.123.123.123:user): ftp-user 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> ls 200 PORT command successful. Consider using PASV. 150 Here comes the directory listing. # Ausgabe der Dateien und Ordner 226 Directory send OK. ftp> quit 221 Goodbye. |
Soweit so gut, jetzt soll aber der FTP Zugriff auf über ein FTP-Client vom local_pc funktionieren. Ich habe es sowohl mit FireFTP als auch mit FileZilla probiert, ohne Erfolg. Dabei bekomme folgende Ausgabe in FileZilla:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | # zuvor in Einstellung "Generic proxy# auf SOCKS 5 und host=localhost port=23456 Status: Connecting to 123.123.123.123 through proxy Status: Resolving address of localhost Status: Connecting to 127.0.0.1:23456... Status: Connection with proxy established, performing handshake... Status: Connection established, waiting for welcome message... Response: 220 (vsFTPd 2.3.2) Command: USER ftp-user Response: 331 Please specify the password. Command: PASS ********** Response: 230 Login successful. Command: SYST Response: 215 UNIX Type: L8 Command: FEAT Response: 211-Features: Response: EPRT Response: EPSV Response: MDTM Response: PASV Response: REST STREAM Response: SIZE Response: TVFS Response: UTF8 Response: 211 End Command: OPTS UTF8 ON Response: 200 Always in UTF8 mode. Status: Connected Status: Retrieving directory listing... Command: PWD Response: 257 "/" Command: TYPE I Response: 200 Switching to Binary mode. Command: PASV Response: 227 Entering Passive Mode (123,123,123,123,199,127). Command: LIST Status: Connecting to 127.0.0.1:23456... Status: Connection with proxy established, performing handshake... Error: Connection timed out Error: Failed to retrieve directory listing |
Gleiches Ergebnis bekomme ich mit FireFTP beim Kommando LIST -al reagiert die Verbindung nicht mehr... soweit ich das bisher durchschaue muss die Lösung irgendwie mit den Ports die das FTP-Protokoll verwendet zusammenhängen. Ich bin aber noch nicht dahinter gekommen.
Hoffe ihr habt Rat für mich!
Gruß Valentin
PS: Im Terminal in dem ich die SSH-Verbindung aufgebaut habe bekomme ich im Moment des Timeouts folgende Meldung:
channel 4: open failed: connect failed: Connection timed out