Installing TFTP Server In RHEL7/CentOS7

Installing TFTP Server In RHEL7/CentOS7

(Image Source Google)

Trivial File Transfer Protocol (TFTP) is an Internet software utility for transferring files that is simpler to use than the File Transfer Protocol (FTP) but less capable. It is used where user authentication and directory visibility are not required. TFTP uses the User Datagram Protocol (UDP) rather than the Transmission Control Protocol (TCP). TFTP is described formally in Request for Comments (RFC) 1350.

1. Install tftp-server

TFTP server can be installed using following command, where xinetd is necessary.

# yum install tftp tftp-server* xinetd*

Then edit /etc/xinetd.d/tftp – set disable to no and add -c option into server_args if you need to upload files to TFTP server from client.

After these two commands, permanent links will be made for xinetd and TFTP services.3. Configure SELinux

In RHEL 7.0/CentOS 7, the SELinux is not supposed to be disabled(the system will abort booting if you disable SELinux). So the TFTP read and write must be allowed in SELinux. By default, the SELinux uses enforcing policy, which does not accept any change. To make any change to SELinux, first modify /etc/selinux/config and change the policy to permissive:

# vim /etc/selinux/config

# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing – SELinux security policy is enforced. # permissive – SELinux prints warnings instead of enforcing. # disabled – No SELinux policy is loaded. SELINUX=permissive # SELINUXTYPE= can take one of three two values: # targeted – Targeted processes are protected, # minimum – Modification of targeted policy. Only selected processes are protected. # mls – Multi Level Security protection. SELINUXTYPE=targeted