Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

19.2.2 Configure the TFTP service program


May 24, 2021 That's what Linux should learn



We have studied vsftpd services and TFTP services in Chapter 11. v sftpd is a feature-rich file transfer service that allows users to access authentication in anonymous open mode, local user mode, and virtual user mode. H owever, the current client host does not have an operating system installed, how to log on to authentication? T FTP, as a simple file transfer protocol based on UDP protocol, does not require user authentication to obtain the required file resources. T herefore, the TFTP service program is then configured to provide boot and drive files for the client host. When the client host has a basic driver, the full disc image file is transferred through the vsftpd service program.

[root@linuxprobe ~]# yum install tftp-server Loaded plugins: langpacks, product-id, subscription-manager This system is not registered to Red Hat Subscription Management. Y ou can use subscription-manager to register. Resolving Dependencies --> Running transaction check ---> Package tftp-server.x86_64 0:5.2-11.el7 will be installed --> Processing Dependency: xinetd for package: tftp-server-5.2-11.el7.x86_64 --> Running transaction check ---> Package xinetd.x86_64 2:2.3.15-12.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved

  1. Package Arch Version Repository Size
  2. ================================================================================
  3. Installing:
  4. tftp-server x86_64 5.2-11.el7 rhel 44 k
  5. Installing for dependencies:
  6. xinetd x86_64 2:2.3.15-12.el7 rhel 128 k
  7. Transaction Summary
  8. ================================================================================
  9. Install 1 Package (+1 Dependent package)
  10. Total download size: 172 k
  11. Installed size: 325 k
  12. Is this ok [y/d/N]: y
  13. Downloading packages:
  14. --------------------------------------------------------------------------------
  15. Total 1.7 MB/s | 172 kB 00:00
  16. Running transaction check
  17. Running transaction test
  18. Transaction test succeeded
  19. Running transaction
  20. Installing : 2:xinetd-2.3.15-12.el7.x86_64 1/2
  21. Installing : tftp-server-5.2-11.el7.x86_64 2/2
  22. Verifying : 2:xinetd-2.3.15-12.el7.x86_64 1/2
  23. Verifying : tftp-server-5.2-11.el7.x86_64 2/2
  24. Installed:
  25. tftp-server.x86_64 0:5.2-11.el7
  26. Dependency Installed:
  27. xinetd.x86_64 2:2.3.15-12.el7
  28. Complete!

TFTP is a very streamlined file transfer service program whose operation and shutdown are managed by the xinetd network daemon service. T he xinetd service program listens to multiple ports of the system at the same time, and then requests the appropriate service program based on the port number requested by the user in response to the user's request. T he TFTP service program needs to be turned on, just change the disable parameter to no in the profile of the xinetd service program. Save the profile and exit, then restart the xinetd service program and add it to the boot item (in the RHEL 7 system, the xinetd service program is enabled by default, so it is normal not to have output information when adding it to the boot item).

(root@linuxprobe .d) vim /etc/xinetd.d/tftp service tftp s socket_type s dgram protocol s udp wait s yes user s root server s /usr/sbin/in.tftpd server_args s /var/lib/tftpboot disable s no per_source s 11 cps s 100 2 flags s IPv4 s root@linuxprobe xinetd.d s systemctl restart xinetd s root@linuxprobe xinetd.d s systemctl enable xinetd TFTP service provider defaults to the UDP protocol, which occupies a port number of 69, Therefore, in a production environment, you also need to write an allow policy in the firewalld firewall management tool that makes it permanently effective so that the client host can get the boot file smoothly.

[root@linuxprobe ~]# firewall-cmd --permanent --add-port=69/udp success [root@linuxprobe ~]# firewall-cmd --reload success