FTP服务器搭建(局域网版+广域网版)

目录

什么是FTP服务器

FTP服务器(File Transfer Protocol Server)是在互联网上提供文件存储和访问服务的计算机,它们依照FTP协议提供服务。 FTP是File Transfer Protocol(文件传输协议)。顾名思义,就是专门用来传输文件的协议。简单地说,支持FTP协议的服务器就是FTP服务器。

软件种类

  1. Server-U
  2. FileZilla
  3. VsFTP
  4. IIS FTP

工作模式

FTP是仅基于TCP的服务,不支持UDP。与众不同的是FTP使用2个端口,一个数据端口和一个命令端口(也可叫做控制端口)。通常来说这两个端口是21(命令端口)和20(数据端口)。但FTP 工作方式的不同,数据端口并不总是20。这就是主动与被动FTP的最大不同之处。主要有两种工作模式:

  1. 主动模式(PORT)
    主动模式下,客户端随机打开一个大于1024 的端口向服务器的命令端口 P,即 21 端口,发起连接,同时开放N +1 端口监听,并向服务器发出 “port N+1” 命令,由服务器从它自己的数据端口 (20) 主动连接到客户端指定的数据端口 (N+1)。
    FTP 的客户端只是告诉服务器自己的端口号,让服务器来连接客户端指定的端口。对于客户端的防火墙来说,这是从外部到内部的连接,可能会被阻塞。

  2. 被动模式(PASV)
    为了解决服务器发起到客户的连接问题,有了另一种 FTP 连接方式,即被动方式。命令连接和数据连接都由客户端发起,这样就解决了从服务器到客户端的数据端口的连接被防火墙过滤的问题。
    被动模式下,当开启一个 FTP 连接时,客户端打开两个任意的本地端口 (N > 1024 和 N+1) 。

总结

在主动模式下:FTP服务器的控制端口是21,数据端口是20,所以在做静态映射的时候只需要开放21端口即可,他会用20端口和客户端主动的发起连接。

在被动模式下:FTP服务器的控制端口是21,数据端口是随机的,且是客户端去连接对应的数据端口,所以在做静态的映射话只开放21端口是不可以的。此时需要做DMZ。

本地FTP服务器搭建(简易版)

参考资料:https://www.cnblogs.com/popfisher/p/7992036.html

第一步:配置IIS Web服务器

  • 1.1 控制面板中找到“程序”并打开

  • 1.2 “程序”界面找到“启用或关闭Windows功能”并打开

    上面两步也可以简化为一步:按【Win + R】快捷键打开运行对话框,输入“optionalfeatures”后,按回车键

  • 1.3 从“启用或关闭Windows功能”弹窗中找到Internet Information Services(或者中文版Internet信息服务)并打开

  • 1.4 配置IIS并点击确定
    win功能中配置IIS

第二步:配置IIS Web站点

  • 2.1 开始菜单搜索“IIS”并点击进入IIS管理器(Internet Information Services (IIS)管理器)

    简化操作:按【Win + R】快捷键打开运行对话框,输入“inetMgr.exe”后,按回车键

  • 2.2 新建FTP站点

    • 2.2.1 新建FTP服务器 根目录文件夹

      这步就是你随便找个位置新建一个文件夹,这个文件夹可以随意放置,没有特定需要,当然,尽量不要放在系统盘。

    • 2.

  • 5
    点赞
  • 41
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
SolarWinds Serv-U version 15.1.2 Hotfix 2 ----------------------------------------- This fix contains solutions for the following issues: 1) SQL injection vulnerability in the invitation link used by secure file sharing. 2) Persistent cross-site scripting vulnerability in file sharing. 3) Vulnerability which allows for the injection of additional email headers by using a crafter subject in an upload or download request. Installation Instructions ------------------------- This hotfix requires updating Serv-U. Within the Serv-U folder there is a folder for each supported platform. Please use the files for your appropriate platform when updating Serv-U. The folder contains files with the appropriate directory structure (if necessary) to upgrade your installation. This hotfix requires Serv-U version 15.1.2 Hotfix 1 ------------------------- TO INSTALL: 1) Shut down all running Serv-U processes. i) Right-click the tray icon, and then select "Stop Serv-U". ii) Right-click the tray icon, and then select "Exit Tray". 2) Make a backup copy of the following files: Windows: <Serv-U-InstallDir>\Serv-U.exe <Serv-U-InstallDir>\Serv-U.dll <Serv-U-InstallDir>\Serv-U-RES.dll <Serv-U-InstallDir>\RhinoNET.dll <Serv-U-InstallDir>\RhinoRES.dll <Serv-U-InstallDir>\Client\Web Client\Share\GuestDownload.htm <Serv-U-InstallDir>\Client\Web Client\Share\GuestUpload.htm <Serv-U-InstallDir>\Client\Web Client\Share\ShareDetails.htm Linux: <Serv-U-InstallDir>\Serv-U <Serv-U-InstallDir>\Client\Web Client\Share\GuestDownload.htm <Serv-U-InstallDir>\Client\Web Client\Share\GuestUpload.htm <Serv-U-InstallDir>\Client\Web Client\Share\ShareDetails.htm 3) Extract the ZIP file to a temporary location. 4) Open the folder for the platform Serv-U is installed on. For example, open the "Windows 32-bit" folder if Serv-U is installed on a 32-bit version of Windows. 5) Copy the contents of this folder to your Serv-U installation directory. For Windows, the default installation directory is: C:\Program Files\RhinoSoft\Serv-U -or- C:\Program Files\RhinoSoft.com\Serv-U For Linux, the default installation directory is: /usr/local/Serv-U 6) On Linux, modify the permissions of the files by executing the following command: chmod u+xs Serv-U 7) Restart the Serv-U tray application. 8) Right-click the tray icon, and then select "Start Serv-U". After applying this hotfix, the issues outlined in the description should no longer occur. ------------------------- TO UNINSTALL: 1) Shut down all running Serv-U processes. i) Right-click the tray icon, and then select "Stop Serv-U". ii) Right-click the tray icon, and then select "Exit Tray". 2) Replace the following files with your backed up copies: Windows: <Serv-U-InstallDir>\Serv-U.exe <Serv-U-InstallDir>\Serv-U.dll <Serv-U-InstallDir>\Serv-U-RES.dll <Serv-U-InstallDir>\RhinoNET.dll <Serv-U-InstallDir>\RhinoRES.dll <Serv-U-InstallDir>\Client\Web Client\Share\GuestDownload.htm <Serv-U-InstallDir>\Client\Web Client\Share\GuestUpload.htm <Serv-U-InstallDir>\Client\Web Client\Share\ShareDetails.htm Linux: <Serv-U-InstallDir>\Serv-U <Serv-U-InstallDir>\Client\Web Client\Share\GuestDownload.htm <Serv-U-InstallDir>\Client\Web Client\Share\GuestUpload.htm <Serv-U-InstallDir>\Client\Web Client\Share\ShareDetails.htm 3) Restart the Serv-U tray application. 4) Right-click the tray icon, and then select "Start Serv-U". ------------------------- Key和Backup两个选项,然后点Patch完成注册; 如果出现“File Serv-U.dll obscure”提示而无法勾选那两个选项,是因为将32位和64位的破解方法搞混,并不是文件被锁 定、进程占用或只读写保护等等问题,因为Serv-U.dll可以直接被删除,只要针对本使用对应破解方法即可。
好的,我可以回答您关于Linux网络实战中FTP服务器搭建的问题。首先,我们需要在Linux系统上安装FTP服务器软件。常用的FTP服务器软件有vsftpd、proftpd、pure-ftpd等。这里以vsftpd为例,介绍FTP服务器的搭建过程。 1. 安装vsftpd软件 在Linux系统上使用以下命令安装vsftpd软件: ``` sudo apt-get install vsftpd ``` 2. 配置vsftpd 在安装完成后,需要对vsftpd进行配置。配置文件一般位于/etc/vsftpd.conf。可以使用以下命令进行编辑: ``` sudo nano /etc/vsftpd.conf ``` 在编辑器中,您可以设置FTP服务器的参数,例如允许匿名访问、允许本地用户访问、设置FTP根目录等。 3. 启动vsftpd服务 配置完成后,需要启动vsftpd服务。可以使用以下命令启动服务: ``` sudo service vsftpd start ``` 4. 防火墙设置 如果您的Linux系统启用了防火墙,需要设置FTP服务器的防火墙规则,允许FTP数据传输的端口通过防火墙。一般FTP数据传输使用的是20和21端口。可以使用以下命令设置防火墙规则: ``` sudo ufw allow 20/tcp sudo ufw allow 21/tcp ``` 5. 测试FTP服务器 在FTP服务器搭建完成后,可以使用FTP客户端测试FTP服务器是否正常工作。您可以使用Linux系统自带的FTP客户端命令进行测试。例如: ``` ftp IP地址 ``` 其中IP地址为您的FTP服务器所在主机的IP地址。在连接成功后,您可以使用FTP客户端进行文件上传、下载等操作。 希望以上内容能够帮到您。如果您有其他问题,欢迎继续向我提问。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值