tftpd-hpa server (timeout from client side) please help
Solution 1
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
Solution 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
Related videos on Youtube
Jar_rod
Updated on September 18, 2022Comments
-
Jar_rod over 1 year
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
andsudo 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.
-
Admin about 10 yearsI 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.
-
Admin almost 10 yearsI had same issue. The method suggested above worked out for me. Ubuntu14.04.
-
Admin over 4 yearsHi, 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
-
-
Jar_rod about 10 yearsUnfortunately, 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!
-
2707974 about 10 yearsWeird. Only to note you to remove first tftpd-hpa before install tftpd
-
Jens over 4 yearsIf 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.