FTP + DNS

Here Insert Picture Description
FTP (File Transfer Protocol) File Transfer service, using client / server model. , Users can upload or download files and other operations in an FTP server via FTP protocol.

Here Insert Picture Description
DNS (Domain Name System) that is the Domain Name System (Service) protocol is a distributed network directory services, mostly to translate between domain names and IP addresses, as well as control of the Internet to send e-mail.

Today small for everyone to explain in detail what these two services to build :( static NIC status configuration)

FTP configuration

First, configure the anonymous user

Preparation phase
1, NIC configuration
Here Insert Picture Description
Here Insert Picture Description

Here, the address is wrong, because there is no cut full view before, so now the sake of completeness, in particular looking to make up for the figure, but the data is wrong, the correct data is as follows:
IPADDR = 192.168.17.2

NETMASK=255.255.255.0

GATEWAY=192.168.17.1

2, mount the CD to a local
Here Insert Picture Description

Vsftpd create a source package, the owner of the pub changed ftp

Here Insert Picture Description

3, edit vsftp subject files, configuration anonymous access)

vim /etc/vsftpd/vsftpd.conf
Here Insert Picture Description

4. Restart the vsftpd service and view, turn off the firewall and sandbox
Here Insert Picture Description

5. In the guest operating static configuration card
Here Insert Picture Description
Here Insert Picture Description

Note that the address is wrong, is wrong with the map, there should be:

IPADDR=192.168.17.4

NETMASK=255.255.255.0

GATEWAY=192.168.17.1

6. Restart and check card services

Here Insert Picture Description

Here, the address is 192.168.17.4

7. Create a directory and mount, switch to the CD-ROM path and ftp download packages

Here Insert Picture Description

8. anonymous access to the server, download the source package vsftpd
Here Insert Picture Description

9. Switch to the root directory
Here Insert Picture Description

10.Ctrl + shift + t open a new terminal and switch to create a file in the main directory
Here Insert Picture Description

11. Return just switched to the first terminal directory pub

Here Insert Picture Description
12. Use another server may be in communication with the client ping test,

Upload files to create and view

Here Insert Picture Description

Here, the address is also a small problem, doing it to the address ignored

Second, the local user

1, configure a static NIC card and restart the service and view

Here Insert Picture Description

2, mount the CD to a local
Here Insert Picture Description

3. in the server operation, vsftpd edit the host file, and create user

Cursor line to add the # key (anonymous user logs in front of them, because there is a local user login)

Here Insert Picture Description

022 changed to 077

Here Insert Picture Description

这行前面#去掉,下面添加一行

Here Insert Picture Description

4.重启服务
Here Insert Picture Description

5.创建本地用户,并设置密码(密码为123)

Here Insert Picture Description

6.客户端上创建一个文件,并查看

Here Insert Picture Description

7.访问服务器,名字输入刚创建的用户zs,密码
Here Insert Picture Description

8.上传刚创建的文件并查看,然后退出

Here Insert Picture Description

9.在服务器上查看一下刚创建的文件是不是在zs用户下
Here Insert Picture Description

10.编辑用户列表文件

Here Insert Picture Description
Here Insert Picture Description

11、编辑vsftpd的主体文件
Here Insert Picture Description
Here Insert Picture Description

将监听改为yes,将IPv6关闭,并添加监听的服务器和端口Here Insert Picture Description

12、重启服务

Here Insert Picture Description

13、查看端口,会发现地址和端口都发生了变化

Here Insert Picture Description

14、接下来更改被动模式,依旧输入命令编辑vsftpd的主体文件

Here Insert Picture Description
Here Insert Picture Description

主动模式改为no.就行
Here Insert Picture Description

15.重启服务然后便完成
Here Insert Picture Description

三、配置虚拟用户

1.配置网卡

Here Insert Picture Description

挂载光盘到本地

Here Insert Picture Description

2.编辑文本格式的用户名,密码

Here Insert Picture Description
Here Insert Picture Description

  1. 切换到vsftpd目录
    Here Insert Picture Description

4.创建db格式的数据库文件并查看

Here Insert Picture Description

5设置文件权限并查看
Here Insert Picture Description

6.建用户并更改家目录的路径和用户指定shell环境

Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

7.给予ftp目录777权限

Here Insert Picture Description

8.切换到pam.d目录并查看
Here Insert Picture Description

Here Insert Picture Description

9.复制ftp认证文件信息,复制到本地

Here Insert Picture Description

10.编辑PAM认证文件11.编辑vsftpd配置文件
Here Insert Picture Description
Here Insert Picture Description

11.编辑vsftpd配置文件

Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

13.切换到vsftpd目录创建users目录并查看

Here Insert Picture Description

14.切换到uesrs路径并编辑zs文件
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

15.重启vsftpd服务并查看服务端口号
Here Insert Picture Description
Here Insert Picture Description

16.关闭防火墙和沙盒

Here Insert Picture Description

17.在客户端配置静态网卡,重启网卡服务并查看

Here Insert Picture Description
Here Insert Picture Description

重启网卡服务并查看

Here Insert Picture Description

重启网卡服务并查看

18.创建目录并挂载,切换到光驱目录并下载ftp软件包

Here Insert Picture Description

19.访问服务端,上传文件测试+创建目录验证

Here Insert Picture Description

先试试上传文件:
Here Insert Picture Description

再试试创建目录并验证

Here Insert Picture Description

注:这里最后一张图也是截取的之前的,忽略IP就行,内容可以用。

DNS的配置

服务机

1.配置静态网卡
Here Insert Picture Description
Here Insert Picture Description

2.重启网卡服务并查看

Here Insert Picture Description

3.创建目录并挂载,切换到光驱目录并下载bind软件包和bind-chroot软件包
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

4.查看服务运行状态;关闭防火墙和沙盒
Here Insert Picture Description

  1. 编辑主配置文件中全局配置部分

Here Insert Picture Description
Here Insert Picture Description

  1. 编辑主配置文件中区域配置文件部分

Here Insert Picture Description
Here Insert Picture Description

完了在最后一行写入PP粘贴并修改配置文件如下:

正向解析
Here Insert Picture Description

反向解析
Here Insert Picture Description

  1. 切换到区域数据配置文件存放路径

Here Insert Picture Description

  1. 添加配置文件复制权限

Here Insert Picture Description

9.编辑正向解析
Here Insert Picture Description
Here Insert Picture Description

10.编辑反向解析

Here Insert Picture Description
Here Insert Picture Description

11. Detection editor

Here Insert Picture Description

12. Start the service and view the service port

Here Insert Picture Description

Here Insert Picture Description

Client computer

Configuring a static NIC, reboot and check card services
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

Here Insert Picture Description

2. Test forward and reverse lookup resolve
Here Insert Picture Description

Released four original articles · won praise 3 · Views 318

Guess you like

Origin blog.csdn.net/xxx0028/article/details/104411692
FTP