6

I'm a bit new to version 14.04 of Ubuntu:
No LSB modules are available.

I am trying to set up a tftp server, mostly for backup up cisco ios configs. I have followed every tutorial I can, and I'm getting nowhere. The problem seems to be a timeout, waiting for the write request from the client side:

Before I try to transfer:

ps -aux | grep tftp
root      7804  0.0  0.0  15128   160 ?        Ss   10:48   0:00 /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure -c -vv -i /var/lib/tftpboot

After I use my windows 7 tftp client to send a put request:

jarrod@Dangerfield:~$ ps -aux | grep tftp
root      7804  0.0  0.0  15128   160 ?        Ss   10:48   0:00 /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure -c -vv -i /var/lib/tftpboot
tftp      8819  0.0  0.0  15132   632 ?        S    11:04   0:00 /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure -c -vv -i /var/lib/tftpboot

You can see it open the second connection and then it just times out.

It then creates an empty file:

-rw-rw-rw- 1 tftp tftp 0 Apr 28 11:04 AcousticList.txt

in directory:

drwxrwxrwx 2 tftp tftp 4096 Apr 28 11:04 tftpboot

These are my defaults:

:/etc/default$ more tftpd-hpa
# /etc/default/tftpd-hpa

#RUN_DAEMON="yes"
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure -c -vv -i"

I have the -c for create files, secure for the one directory, -vv for verbose logging. I found the i option on one of the help files. Adding that did not help nor hurt. It always does the same thing.
UFW is disabled.

/etc/default$ sudo service ufw status
ufw stop/waiting

I can't see anything else that would be stopping this.

I kill -9 the root and tftp user processes. The root process starts again listening immediately. The tftp user process only starts when you initiate the tftp transfer. This is just using upstart. I have tried running it in stand alone with the same result.

in.tftpd[8897]: WRQ from 192.168.0.6 filename AcousticList.txt

I have tried running wireshark and sudo tcpdump -vvv -i eth0 | grep tftp

I'm not really getting any further than the write request is coming in, then there is a timeout on the client end.

If anyone could help me, I would really appreciate it as I am at a dead end.

3
  • I have also set RUN_DAEMON="yes" to no. I've tried dropping and adding all kinds of things. I always kill any outstanding services and restart as well after changes. – Jar_rod Apr 28 '14 at 15:21
  • I had same issue. The method suggested above worked out for me. Ubuntu14.04. – user308099 Jul 22 '14 at 18:59
  • Hi, has this problem been resolved i have the same issue and i've checked everything from ufw to iptables to permissions all seem good and it should work but i don't understand why it doesn't – Mheni Oct 4 '19 at 15:26
3

On this way work for me

Install following packages.

sudo apt-get install xinetd tftpd tftp

Create /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
3
  • Unfortunately, this did not work for me. It's the same result, basically creating a file that has zero bytes in it. I'm thinking there has to be something that doesn't let the server complete the file transfer request. It is creating the file, adding the proper permissions, but not responding past that write request. There has to be something that is acting like a firewall that is stopping the file from being transfer, but allowing the file creation on the server side. I know it isn't ufw. Will keep digging. Thanks! – Jar_rod Apr 29 '14 at 13:52
  • Weird. Only to note you to remove first tftpd-hpa before install tftpd – 2707974 Apr 30 '14 at 8:40
  • Yes, removed tftpd-hpa before I tried. Since both ways had the same result, it almost seems like something is stopping the file transfer after the file is created. The tftp sever works. You can use it internally, from a different directory using the tftp command to move a file. It isn't my router since it's all in my LAN. That's why I thought maybe a firewall issue, but UFW is disabled. TCPwrappers or anything else like that stopping it, or something I didn't know about in 14.04 that was new? – Jar_rod May 1 '14 at 3:23
2

i had the same problem. it is caused by windows firewall. after adding the tftp client, you also need to make sure it it is allowed on the firewall

go to Windows Firewall > allowed programs > allowed another program > find the tftp.exe at c:\windows\systems32\tftp.exe

1
  • If you are testing your server from a Windows client try this. It was indeed the problem I had. Weirdly, the server still showed the connection attempt, but the client reported a failed connection attempt later. – Jens Nov 26 '19 at 10:47
0

Check firewall status and disable it

$ sudo ufw disable
Firewall stopped and disabled on system startup

then restart xinetd service.

$ sudo /etc/init.d/xinetd restart

 * Stopping internet superserver  xinetd  [ OK ] 
 * Starting internet superserver xinetd   [ OK ] 

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.