Glam Prestige Journal

Bright entertainment trends with youth appeal.

So basically I need to run a TFTP server in order to update and host firmware for a few devices in my network. From what I've read tftpd-hpa is the best option, but I have tried the older tftpd using xinit. The logs below are from tftpd-hpa although I was experiencing the same thing on the older version as well. Basically I can connect to the tftp server with a client, but any time I try to write or read files it just times out as shown below

tftp> get test.txt
sent RRQ <file=test.txt, mode=netascii>
sent RRQ <file=test.txt, mode=netascii>
sent RRQ <file=test.txt, mode=netascii>
sent RRQ <file=test.txt, mode=netascii>
sent RRQ <file=test.txt, mode=netascii>
Transfer timed out.
tftp> put test.txt
sent WRQ <file=test.txt, mode=netascii>
sent WRQ <file=test.txt, mode=netascii>
sent WRQ <file=test.txt, mode=netascii>
sent WRQ <file=test.txt, mode=netascii>
sent WRQ <file=test.txt, mode=netascii>
Transfer timed out. 

In trying to confirm that my server is receiving the request I ran tshark on the host, and was able to confirm that I am receiving the commands from the client as shown below.

serveradmin@delln0d31:/srv/tftp$ sudo tshark -f udp port 69 Running as user "root" and group "root". This could be dangerous. tshark: A default capture filter was specified both with "-f" and with additional command-line arguments. serveradmin@delln0d31:/srv/tftp$ sudo tshark -f "udp port 69" Running as user "root" and group "root". This could be dangerous. Capturing on 'eno1' 1 0.000000000 192.168.1.200 → 192.168.1.125 TFTP 62 Read Request, File: test.txt, Transfer type: netascii
2 5.000991153 192.168.1.200 → 192.168.1.125 TFTP 62 Read Request, File: test.txt, Transfer type: netascii
3 10.001536226 192.168.1.200 → 192.168.1.125 TFTP 62 Read Request, File: test.txt, Transfer type: netascii
4 15.002140629 192.168.1.200 → 192.168.1.125 TFTP 62 Read Request, File: test.txt, Transfer type: netascii
5 20.002733911 192.168.1.200 → 192.168.1.125 TFTP 62 Read Request, File: test.txt, Transfer type: netascii
6 1978.710412073 192.168.1.200 → 192.168.1.125 TFTP 62 Write Request, File: test.txt, Transfer type: netascii
7 1983.711206606 192.168.1.200 → 192.168.1.125 TFTP 62 Write Request, File: test.txt, Transfer type: netascii
8 1988.711957568 192.168.1.200 → 192.168.1.125 TFTP 62 Write Request, File: test.txt, Transfer type: netascii
9 1993.712441259 192.168.1.200 → 192.168.1.125 TFTP 62 Write Request, File: test.txt, Transfer type: netascii
10 1998.713832432 192.168.1.200 → 192.168.1.125 TFTP 62 Write Request, File: test.txt, Transfer type: netascii

Im not super familiar with the tftp protocol so maybe someone with more experience will be able to pick something out from the cap. As far as I can confirm there is no firewall enabled. I had heard something about iptables being a problem but I was not able to really confirm it one way or another.

I originally let tftpd-hpa create the directory, and use the perms that it gave it, but later tried just giving it the following permissions

drwxrwxrwx 2 nobody nogroup 4096 Oct 5 00:07 tftp 

and even with completely open perms it still wouldn't read.

I'm running it on Ubuntu just for reference.

Linux delln0d31 5.4.0-88-generic #99-Ubuntu SMP Thu Sep 23 17:29:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Edit: output of iptables-save

# Generated by iptables-save v1.8.4 on Wed Oct 6 17:33:03 2021
*filter
:INPUT ACCEPT [144472:14726132]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [12269:3225300]
COMMIT
# Completed on Wed Oct 6 17:33:03 2021 

The other problem I'm having is just finding relevant information. Most of the articles seem to be at least 10 years old. I think I found 1 from 2019 but it didn't give a solution that worked for me. Any help is greatly appreciated, let me know if I can add more stuff to make the question clearer. Thanks!

3

1 Answer

Okay well, I figured it out in the end. I had two problems that looked like one to begin with.

The first is that I didn't have the -c option enabled so when trying to write flash from my ProCurve to the server it wouldn't work. By editing /etc/default/tftpd-hpa config file and adding -c to the arguments I was now able to write files to the server. The error code that the switch gave me was super generic and knowing that it was a config error would have saved me from jumping down the rabbit hole.

The second error stems from my use of WSL to try and diagnose the TFTP server. For reasons beyond my knowledge WSL doesn't play nice with TFPT, I'm assuming mainly because it's not a native Linux environment but that's only speculation.

Just thought I'd throw the answer up in case anyone run into the same issue.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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