Setup TFTP Server on RHEL 8

Steps to setup TFTP server on RHEL 8 to store configuration files of network devices

Install TFTP Server & Client

sudo dnf install -y tftp-server tftp

Modify the ExecStart in /usr/lib/systemd/system/tftp.service to start with -c -p -s

sudo vi /usr/lib/systemd/system/tftp.service

ExecStart=/usr/sbin/in.tftpd -c -p -s /var/lib/tftpboot
  • -c : Allow new files to be created

Reload systemd daemon and tftp service

sudo systemctl daemon-reload
sudo systemctl restart tftp

Set permission for /var/lib/tftpboot – the default location of TFTP Server

sudo chmod 777 /var/lib/tftpboot

Allow TFTP service in Firewalld

sudo firewall-cmd --add-service=tftp --permanent
sudo firewall-cmd --reload

Verify UDP 69 is in listening state and TFTP service is in Active State

[kwyong@rhel system]$ ss -tulpn | grep :69
udp    UNCONN   0        0                       *:69                   *:*
[kwyong@rhel system]$ sudo systemctl status tftp
● tftp.service - Tftp Server
   Loaded: loaded (/usr/lib/systemd/system/tftp.service; indirect; vendor preset: disabled)
   Active: active (running) since Thu 2020-04-02 10:42:28 +08; 11s ago
     Docs: man:in.tftpd
 Main PID: 15909 (in.tftpd)
    Tasks: 1 (limit: 11115)
   Memory: 176.0K
   CGroup: /system.slice/tftp.service
           └─15909 /usr/sbin/in.tftpd -c -p -s /var/lib/tftpboot

Apr 02 10:42:28 systemd[1]: Started Tftp Server.
Scroll to Top