네트워크 외부에서 FTP 연결을 설정할 수 없습니다.

네트워크 외부에서 FTP 연결을 설정할 수 없습니다.

한 대의 Windows 7 컴퓨터에서 실행 중인 FTP 서버에 연결할 수 없습니다. 내 NAT 라우터에는 5000-5100 및 21개의 포트가 열려 있고 외부 IP 주소가 있고 LAN의 FTP가 작동하며 이미 ftptest.net 및 다른 FTP 테스터에서 내 외부 IP 주소를 사용하여 테스트했으며 모두 잘 작동합니다. 그런데 브라우저에서 접속하려고 하면 연결이 거부된다고 뜹니다. 또한 FTP 디렉터리를 나열하기 위해 일부 Python 및 C# 스크립트를 시도했습니다. LAN에서는 문제가 없지만 외부 IP에서는 동일한 오류가 발생합니다.

FTPTest.net 출력:

Status: Resolving address of 192.140.xx.xxx
Status: Connecting to 192.140.xx.xxx
Warning: The entered address does not resolve to an IPv6 address.
Status: Connected, waiting for welcome message...
Reply: 220-FileZilla Server 0.9.60 beta
Reply: 220-written by Tim Kosse ([email protected])
Reply: 220 Please visit https://filezilla-project.org/
Command: CLNT https://ftptest.net on behalf of 192.140.xx.xxx
Reply: 200 Don't care
Command: AUTH TLS
Reply: 234 Using authentication type TLS
Status: Performing TLS handshake...
Status: TLS handshake successful, verifying certificate...
Status: Received 1 certificates from server.
Status: cert[0]: subject='CN=192.140.xx.xxx,C=55,ST=Bahia,L=Itabuna,O=Contato Pericia Automotiva,OU=Contato Itabuna,[email protected]' issuer='CN=192.140.xx.xxx,C=55,ST=Bahia,L=Itabuna,O=Contato Pericia Automotiva,OU=Contato Itabuna,[email protected]'
Command: USER anonymous
Reply: 331 Password required for anonymous
Command: PASS ************************
Reply: 230 Logged on
Command: SYST
Reply: 215 UNIX emulated by FileZilla
Command: FEAT
Reply: 211-Features:
Reply: MDTM
Reply: REST STREAM
Reply: SIZE
Reply: MLST type*;size*;modify*;
Reply: MLSD
Reply: AUTH SSL
Reply: AUTH TLS
Reply: PROT
Reply: PBSZ
Reply: UTF8
Reply: CLNT
Reply: MFMT
Reply: EPSV
Reply: EPRT
Reply: 211 End
Command: PBSZ 0
Reply: 200 PBSZ=0
Command: PROT P
Reply: 200 Protection level set to P
Command: PWD
Reply: 257 "/" is current directory.
Status: Current path is /
Command: TYPE I
Reply: 200 Type set to I
Command: PASV
Reply: 227 Entering Passive Mode (192,140,xx,xxx,19,140)
Command: MLSD
Status: Data connection established, performing TLS handshake...
Status: TLS handshake successful, verifying certificate...
Status: Received 1 certificates from server.
Status: cert[0]: subject='CN=192.140.xx.xxx,C=55,ST=Bahia,L=Itabuna,O=Contato Pericia Automotiva,OU=Contato Itabuna,[email protected]' issuer='CN=192.140.xx.xxx,C=55,ST=Bahia,L=Itabuna,O=Contato Pericia Automotiva,OU=Contato Itabuna,[email protected]'
Status: TLS session of transfer connection has been resumed.
Reply: 150 Opening data channel for directory listing of "/"
Reply: 226 Successfully transferred "/"
Listing: type=dir;modify=20161214150710; 2016
Listing: type=file;modify=20170808123602;size=2459; 2016 - Atalho.lnk
Listing: type=dir;modify=20170825193146; 2017
Listing: type=file;modify=20141126124218;size=244012; Apresentação1.png
Listing: type=file;modify=20160615135130;size=376600; BOLSONI RASCUNHO.jpg
Listing: type=file;modify=20170306121017;size=349184; Caixa depesas Contato.xls
Listing: type=dir;modify=20170830151015; CONTATO
Listing: type=file;modify=20141126124820;size=21129; CONTATO.jpeg
Listing: type=dir;modify=20170731185326; Documentos
Listing: type=file;modify=20140204041918;size=3049489; DSC00016.JPG
Status: Skipped display of 10 listing lines
Status: Success

앞서 말했듯이 라우터 포트 5000-5100과 21은 열려 있습니다.

FileZilla 서버 옵션에서:

  • 패시브 모드 설정:
    • 사용자 정의 포트 범위: 5000 - 5100
    • 패시브 모드 전송을 위한 외부 서버 IP 주소:
      • 192.140.xx.xxx
  • TLS를 통한 FTP 설정:
    • TLS 지원을 통한 FTP 활성화
    • 기본 포트: 990에서 TLS 연결을 통한 암시적 FTP 수신 대기

FileZilla 인터페이스에는 오류나 경고가 없습니다.

Windows의 방화벽:

로컬 포트 ​​5000-5100에서 프로토콜 TCP와의 연결을 허용하는 인바운드 규칙을 만들었습니다. 원격 포트 모든 포트에서 동일한 오류가 발생하는지 확인하기 위해 21 및 990도 추가했습니다.

또 무엇을 할 수 있나요?

답변1

그래서 방금 동일한 테스트를 다시 수행했고 오늘은 작동하고 있습니다. 왜 그런지 모르겠습니다. 아마도 알지 못한 채 외부 IP 주소를 사용하여 네트워크 내부를 테스트하고 있었을 것입니다.... 하지만 문제는 이제 해결되었습니다.

관련 정보