什么是Ftp端口号以及如何使用Ftp端口?

Ftp or File Transfer Protocol is a popular protocol used to transfer data, file, directory over networks. These networks may be our local network or internet. FTP has simple mechanisms that make it easy to implement and use. In this tutorial, we will look at some FTP related information like port numbers, modes, etc.

FtpFile Transfer Protocol是一种流行的协议,用于通过网络传输数据,文件,目录。 这些网络可能是我们的本地网络或Internet。 FTP具有简单的机制,使其易于实现和使用。 在本教程中,我们将研究一些与FTP相关的信息,例如端口号,模式等。

Ftp端口– TCP 21 (Ftp Port – TCP 21)

The default FTP port is TCP 21. TCP is a transmission level protocol that provides reliable data transfer between hosts. FTP port can be changed easily but most users prefer to stay with default to make client work easy. FTP also uses TCP 20 in some conditions where they will be examined detailed in the following steps.

默认的FTP端口是TCP21。TCP是一种传输级别协议,可在主机之间提供可靠的数据传输。 FTP端口可以轻松更改,但是大多数用户喜欢保留默认设置,以使客户端工作变得容易。 在某些情况下,FTP还将使用TCP 20,将在以下步骤中对其进行详细检查。

检查FTP端口 (Check FTP Port)

We can test remote ftp port with a FTP client like below.

我们可以使用如下所示的FTP客户端测试远程ftp端口。

$ ftp poftut.com

OR we can use telnet just check whether the default FTP port is accessible. We should also specify telnet the FTP port number which is 21 in this example.

或者我们可以使用telnet检查默认的FTP端口是否可访问。 在此示例中,我们还应将telnet指定为FTP端口号21

$ telnet ftp.itu.edu.tr 21
Check FTP Port
Check FTP Port
检查FTP端口

As we can see from screenshot that the ftp.itu.edu.tr FTP server welcomes us. Because the FTP service or port provided by the host name ftp which is under the itu.edu.tr domain. The fully qualified domain name for the FTP service or port is ftp.itu.edu.tr.

从屏幕截图中可以看出, ftp.itu.edu.tr FTP服务器欢迎我们。 因为itu.edu.tr域下的主机名ftp提供的FTP服务或端口。 FTP服务或端口的标准域名是ftp.itu.edu.tr。

Alternatively, the Nmap tool can be used to check the remote FTP port of a single host or multiple hosts. We can use a hostname/domain name or IP address. In the following example, we scan the FTP ports of single and multiple IP addresses.

另外,可以使用Nmap工具检查单个主机或多个主机的远程FTP端口。 我们可以使用主机名/域名或IP地址。 在下面的示例中,我们扫描单个和多个IP地址的FTP端口。

$ nmap -p 21 ftp.itu.edu.tr

Or we can get more information about the FTP port by using -sV and -sC parameters that will run scripts and version scan about the FTP service and print more detailed information like login type, bandwidth limit, client count, server software name and version, etc.

或者,我们可以通过使用-sV和-sC参数来获取有关FTP端口的更多信息,这些参数将运行有关FTP服务的脚本和版本扫描,并输出更详细的信息,例如登录类型,带宽限制,客户端数量,服务器软件名称和版本,等等

Ftp Port, Service and Version
ftp端口,服务和版本

主动和被动模式Ftp连接(Active and Passive Mode Ftp Connections)

FTP provides two main work mode. Active mode mainly used with TCP 21 for command and TCP 20 data transfer. These default port numbers are accessible over network security devices like Firewall, IPS/IDS, etc. Passive mode is used to connect port numbers over 1024 for command and data transfer.

FTP提供两种主要的工作模式。 活动模式主要与TCP 21一起用于命令和TCP 20数据传输。 这些默认端口号可通过防火墙,IPS / IDS等网络安全设备访问。被动模式用于连接1024以上的端口号以进行命令和数据传输。

主动模式连接 (Active Mode Connection)

Active mode is the simpler mode of FTP. It uses two ports for control and data. We will use TCP 21 for FTP commands and TCP 20 for FTP data. The data transfer will be done over TCP 20.

活动模式是FTP的简单模式。 它使用两个端口进行控制和数据传输。 我们将对FTP命令使用TCP 21,对FTP数据使用TCP 20。 数据传输将通过TCP 20完成。

LEARN MORE  Mobaxterm Installation and Usage For Windows
了解更多Mobaxterm Windows的安装和使用

被动模式连接(Passive Mode Connection)

Now in detailed some network devices prevents and blocks ports below 1024. So FTP protocol provides some solution for this which is named Passive Mode. In passive mode, first connections are established to TCP 21 for commands, and then Server opens 2 ports over 1024 number one for command and other for data. For example, if the command port is 2000 the data port is 2001. The server will bind these ports like regular command port and data port to TCP 21 and TCP 20. In order to activate the passive mode the PASV command should be issued according to PORT command during the FTP connection.

现在详细介绍了一些网络设备防止和阻止低于1024的端口。因此FTP协议为此提供了一些解决方案,称为被动模式。 在被动模式下,首先建立到TCP 21的命令连接,然后服务器打开1024个以上的2个端口,一个用于命令,另一个用于数据。 例如,如果命令端口为2000,数据端口为2001。服务器会将这些端口(如常规命令端口和数据端口)绑定到TCP 21和TCP20。为了激活被动模式,应根据以下命令发出PASV命令:在FTP连接期间使用PORT命令。

Ftp客户 (Ftp Clients)

As a simple protocol FTP have a lot of clients for different Operating system families like Windows, Linux, MacOS X, BSD, and different GUI types like command-line, web, desktop, mobile. Below you can find different tutorials about FTP commands.

作为一个简单的协议,FTP具有许多用于不同操作系统家族(例如Windows,Linux,MacOS X,BSD)以及不同GUI类型(例如命令行,Web,桌面,移动)的客户端。 您可以在下面找到有关FTP命令的不同教程。

How To Use Ftp Server From Command Line Tutorial with Examples

如何通过命令行示例使用Ftp服务器

安全FTP端口(Secure FTP Port)

As stated previously FTP does not provide transmission security like encryption by default but we can use alternative ways to solve this issue.

如前所述,默认情况下,FTP不提供像加密一样的传输安全性,但是我们可以使用其他方法来解决此问题。

SSH provides FTP like sub-protocol named SFTP. SFTP works over an SSH connection which is an encrypted connection. To learn more about SFTP look following the tutorial.

SSH提供类似子协议SFTP的FTP。 SFTP通过SSH连接(加密连接)工作。 要了解有关SFTP的更多信息,请查看本教程。

What Is Default SFTP Port and How To Change SFTP Port Number?

什么是默认SFTP端口以及如何更改SFTP端口号?

Linux Sftp Command With Examples

Linux Sftp命令示例

SSL/TLS is one of the most used secure tunneling techniques. We can use SSL/FTP where FTP data will be transferred over an encrypted SSL tunnel.

SSL / TLS是最常用的安全隧道技术之一。 我们可以使用SSL / FTP,其中FTP数据将通过加密的SSL隧道传输。

翻译自: https://www.poftut.com/ftp-port-numbers-ftp-port-used/

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值