내 Azure VM에 배포된 FTP 서버에 연결하는 동안 오류가 발생했습니다.

내 Azure VM에 배포된 FTP 서버에 연결하는 동안 오류가 발생했습니다.

내 Azure VM에 배포된 FTP 서버에 연결하려고 하면 다음 오류가 발생합니다.

Warning: Selected port (18183) is not the default port (21) of the selected protocol.
Warning: The entered address does not resolve to an IPv6 address.
Status: Connected, waiting for welcome message...
Reply: 220-FileZilla Server 0.9.56 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 168.63.97.45
Reply: 200 Don't care
Command: AUTH TLS
Reply: 234 Using authentication type TLS
Status: Performing TLS handshake...
Status: TLS handshake successful, verifying certificate...
Command: USER Usera
Reply: 331 Password required for rheinenergie-klima
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 (100,113,144,72,210,89)
Command: MLSD
Reply: 425 Can't open data connection for transfer of "/"
Error: Listing failed

여러 포럼을 찾아보았지만 구체적인 답변을 찾을 수 없었습니다. 지금까지 나는 능동 모드와 수동 모드에서 그것을 시도했고 다음을 통해 테스트했습니다.https://ftptest.net.

TLS를 통한 FTP가 활성화되어 있고 인증서도 생성했습니다.

내 포트에 대한 인바운드 규칙(18183도 추가됨)

참고: FileZilla 서버에서 제안한 포트를 사용하고 있지 않습니다.

답변1

귀하가 제공한 오류 로그는 귀하의 FTP 클라이언트가 다음을 사용하여 FTP 서버에 연결하고 있음을 보여줍니다.패시브 모드.

이 모드에서 FTP 클라이언트는 2개의 채널을 사용합니다.

  • 그만큼제어 채널(귀하의 경우 포트 18183에서 수신 대기) 서버에 명령을 내리기 위해
  • 그만큼데이터 채널(명령에 표시된 대로 포트 100,113,144,72,210,89에서 수신 대기 PASV), 데이터 보내기/받기

이 2채널 모드를 사용하면 데이터를 전송/수신하는 동안 계속 명령을 내릴 수 있습니다.

귀하의 경우에는 VM 및/또는 네트워크 보안 그룹(사용하는 경우)의 일부 포트가 열려 있지 않은 것 같습니다. 따라서 해당 ACL(액세스 제어 목록)을 생성하거나 VM과 연결된 네트워크 보안 그룹의 인바운드 규칙을 업데이트하여 포트 100,113,144,72,210,89에서 TCP 액세스를 허용해야 합니다.

답변2

Azure RM vms가 avset의 인터넷 로드 밸런서 뒤에 있고 모든 NSG 규칙이 특정 포트에서 열려 있고 Windows 방화벽이 꺼져 있기 때문에 동일한 문제가 있습니다. 데이터 채널 포트의 올바른 정의는 다음을 참조하세요.http://www.serv-u.com/respcode.asp?resp=227

오류: NAT 라우터 뒤에 있는 것 같습니다. 패시브 모드 설정을 구성하고 라우터의 포트 범위를 전달하십시오.

답변: 데이터 채널 포트 범위와 동일한 포트의 로드 밸런서에 NAT 규칙을 추가하여 filezilla 서버를 사용하여 작동하도록 했습니다. PS를 사용해도 됩니다.$LoadBalancer | Add-AzureRmLoadBalancerInboundNatRuleConfig -Name $NatRuleName -FrontendIpConfiguration $frontendIP1 -IdleTimeoutInMinutes 4 -Protocol TCP -FrontendPort 5000 -BackendPort 5000 | Set-AzureRmLoadBalancer

관련 정보