I've been trying to build a TFTP server on a fresh Ubuntu 14.04 build for a number of weeks using articles that I've found on-line, but all my attempts seem to fail as the TFTP server that I've installed seems not to be responding. It doesn't matter if I GET or PUT, I always get a timeout error.

The most recent articles that I've tried are:

Both of these have been unsuccessful, each time with the TFTP client complaining of a timeout error.

I've added (or at least I think I have) rules to the UFW and iptables to allow access to UDP port 69, but without any success.

I have been building my base Ubuntu 14.04 OS from the mini.iso file I've downloaded from the Ubuntu download pages on to a VirtualBox VM (ver 4.3.8 r92456) running on my Win7 pro machine. No additional packages were installed during the initial build, but I have installed SSH and NTP (both of which appear to be working) post initial build. The TFTP client is running from my Win7 machine and the Ubuntu machine has a static IP address.

The connection is being made from a remote TFTP client on my Win7 machine.

$ netstat -apu
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 *:tftp                  *:*                                 8166/xinetd
udp        0      0 test.paumaz.local:ntp   *:*                                 1332/ntpd
udp        0      0 localhost:ntp           *:*                                 1332/ntpd
udp        0      0 *:ntp                   *:*                                 1332/ntpd
udp6       0      0 fe80::250:56ff:febe:ntp [::]:*                              1332/ntpd
udp6       0      0 localhost:ntp           [::]:*                              1332/ntpd
udp6       0      0 [::]:ntp                [::]:*                              1332/ntpd

$ netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 localhost:mysql         *:*                     LISTEN
tcp        0      0 *:ssh                   *:*                     LISTEN
tcp6       0      0 [::]:http               [::]:*                  LISTEN
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN
udp        0      0 *:tftp                  *:*
udp        0      0 test.paumz.local:ntp    *:*
udp        0      0 localhost:ntp           *:*
udp        0      0 *:ntp                   *:*
udp6       0      0 fe80::250:56ff:febe:ntp [::]:*
udp6       0      0 localhost:ntp           [::]:*
udp6       0      0 [::]:ntp                [::]:*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  2      [ ACC ]     STREAM     LISTENING     7010     @/com/ubuntu/upstart
unix  2      [ ACC ]     STREAM     LISTENING     7559     /var/run/dbus/system_bus_socket
unix  2      [ ACC ]     SEQPACKET  LISTENING     7370     /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING     9458     /var/run/mysqld/mysqld.sock
unix  2      [ ACC ]     STREAM     LISTENING     9209     /var/run/acpid.socket

Install following packages.

sudo apt-get install xinetd tftpd tftp

Create /etc/xinetd.d/tftp

sudo nano /etc/xinetd.d/tftp

and put this entry

service tftp
protocol        = udp
port            = 69
socket_type     = dgram
wait            = yes
user            = nobody
server          = /usr/sbin/in.tftpd
server_args     = /tftpboot
disable         = no

Create a folder /tftpboot this should match whatever you gave in server_args. mostly it will be tftpboot

sudo mkdir /tftpboot
sudo chmod -R 777 /tftpboot
sudo chown -R nobody /tftpboot

Restart the xinetd service.

sudo /etc/init.d/xinetd restart

You must allow udp port 69 in firewall.

Edit 1

enter image description here

Like I say, first tftp localhost, then get ....

Give output cat /var/log/syslog | grep tftp

  • Thanks for the response. This is similar (if not the same) as one of the articles that I had tried but was unable to get working.
    – Paumaz
    Feb 5 '15 at 11:45
  • Do you try connect from server to localhost tftp localhost ? If you you in this case have timeout, server not work. What say command netstat -apu?
    – 2707974
    Feb 5 '15 at 12:01
  • Tried running the tftp client from the local Ubuntu machine using the command "get localhost:filename" and this also gives a timeout error.
    – Paumaz
    Feb 5 '15 at 13:35
  • Try first tftp localhost if connection be successful, then type get filename. My tftp server works but command get localhost:filename don't work.
    – 2707974
    Feb 5 '15 at 13:48
  • Tried the "get filename" and this also times out.
    – Paumaz
    Feb 5 '15 at 13:54

Just the same problem here. Old Ubuntu 9.? that has upgraded to 14.04 by clicking "Yes". User is defined from "before" (default everything).

I've found it to work with:

get test  

cat test

This works, where AAA.DDD.DDD.RRR is the actual IP of my own machine.
(I currently have a static local offline net, so eg: tftp is given as command)
Replacing this numeric address with the word "localhost" ==> Timeout at "get"
(it seems to connect ok, but it can't get the files).

  • 2
    Sorry: This "answer" should have been a comment on the previous answer... /Göran
    – Göran
    Apr 5 '15 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.