TFTP server Configuration on CentOS 6.5

In preparation of getting AsterisksNow/FreePBX installed at home I need to get a TFTP server up and running on Centos,…so here’s the config !


Install the from the command line

yum install tftp-server

Add the user tftpd and change the ownership of the tftpboot directory

adduser tftpd chown tftpd:tftpd /var/lib/tftpboot

If you are running iptables and want to allow port 69 (TFTP) port through and make it a permanent rule add this

iptables -I INPUT -p udp –dport 69 -j ACCEPT service iptables save

To start the tftp service on boot add this.

chkconfig xinetd on

If you take a look at the located in usr/share/doc/tftp-server-0.49/  you can find some recommended arguments (Permissions) to apply.

This is a extract from the read me file.

The sanest setup, from a security standpoint, for tftpd to run in is

probably the following:

 1. Create a separate “tftpd” user and group only used for tftpd;

2. Have all your boot files in a single directory tree (usually called


3. Specify “-p -u tftpd -s /var/lib/tftpboot” on the tftpd command line; if

   you want clients to be able to create files use

   “-p -c -U 002 -u tftpd -s /var/lib/tftpboot” (replace 002 with whatever

   umask is appropriate for your setup.)


Once your happy with the permissions restart the tftp service!

service xinetd start

To test everything is working I created a text.txt file and then used tftp to transfer the file to and from the root tftp folder/var/lib/tftpboot using the key words PUT and GET.

Using the PUT command

tftp -v [IP ADDRESS} -c put test.txt/

 Connected to x.x.x.x (x.x.x.x), port 69

 putting test.txt to x.x.x.x :test.txt [netascii]

Using the GET command

tftp -v [IP ADDRESS] -c get test.txt/

Connected to x.x.x.x (x.x.x.x), port 69

getting from x.x.x.x :test.txt to test.txt [netascii]

[root@asterisks tftp-server-0.49]#

 Voila now we have a working TFTP server on a Linux platform


Share and Enjoy:
  • Facebook
  • Google Bookmarks
  • Digg
  • email
  • LinkedIn
  • Live

Leave a Reply