practice / blog

For personal blogging
1 stars 0 forks source link

ftp 연결시 EPSV 모드에 들어가서 연결이 안되는 문제 #31

Open practice opened 8 years ago

practice commented 8 years ago

Apache Mina기반의 Ftp server를 Windows server에 구성하였다. 그런데 내 mac에서 ftp 를 하면

ftp> put shop1.erl
local: shop1.erl remote: shop1.erl
229 Entering Extended Passive Mode (|||2224|)
ftp: Can't connect to `<server's external address>': Operation timed out
200 Command EPRT okay.
150 File status okay; about to open data connection.
100% |*******************************************************************************************************************************************|   530        8.15 MiB/s    00:00 ETA
226 Transfer complete.

이렇게 timed out 되면서 연결을 못한다.

그런데 리눅스서버에 구성된 같은 ftp server로는 아래와 같이 잘된다.

ftp> put shop1.erl
local: shop1.erl remote: shop1.erl
229 Entering Passive Mode (|||2225|)
150 File status okay; about to open data connection.
100% |*******************************************************************************************************************************************|   530       10.52 MiB/s    00:00 ETA
226 Transfer complete.

그런데 Windows 쪽 연결할 때, 아래와 같이 epsv4 명령을 실행하여 EPSV가 아니라 PASV로 하면 잘 된다.

ftp> epsv4
EPSV/EPRT on IPv4 off.
ftp> put shop1.erl
local: shop1.erl remote: shop1.erl
227 Entering Passive Mode (xxx,xxx,xxx,xxx,8,178)
150 File status okay; about to open data connection.
100% |*******************************************************************************************************************************************|   530        5.74 MiB/s    00:00 ETA
226 Transfer complete.

아직 분명한 이유는 잘 모른다. 서버가 위치한 데이터센터의 방화벽에 무슨 문제가 있는지...