HOME RESTORATION DIGITAL PHOTOS DIGITAL BOOKS PROFESSIONAL HISTORY CONTACT ME


CentOS 7 Installing a TFTP Server

Domain name: example.com     Realm name: EXAMPLE.COM

Workgroup: EXAMPLE     Server IP address: xx.xx.xx.xx

Server name: linuxsvr01     Client name: linuxclnt01

Root password: ?Pa55w0rd!

Install the packages that are needed and then enable and start the services.

# yum -y install xinetd tftp-server tftp
# systemctl enable xinetd tftp
# systemctl start xinetd tftp

We will now create a user account that cannot access a shell

# useradd -s /bin/false -r tftp

Then change the ownership of this newly created account

# chown tftp:tftp /var/fileserver/tftp

And modify the TFTP file

# vi /etc/xinetd.d/tftp
# default: off
# description: The tftp server serves files using the trivial file transfer \
#       protocol.  The tftp protocol is often used to boot diskless \
#       workstations, download configuration files to network-aware printers, \
#       and to start the installation process for some operating systems.
service tftp
{
socket_type             = dgram
protocol                = udp
wait                    = yes
user                    = root
server                  = /usr/sbin/in.tftpd
server_args             = -c -s /var/fileserver/tftp
disable                 = no
per_source              = 11
cps                     = 100 2
flags                   = IPv4
}

Restart the services

# systemctl restart xinetd tftp

Allow TFTP through the firewall

# firewall-cmd --permanent --zone=public --add-service=tftp
# firewall-cmd --reload

If SELinux is running we need to issue the following command to allow uploads to the TFTP Server

# chcon -t tftpdir_rw_t /var/fileserver/tftp