Okay, I'm 99% sure this is user error but I have been Google-Fuing for hours and I'm starting to feel like I'm going in circles.
Setup: TP-Link Archer C20 v4, Debian 10 server
Steps followed: first this (https://eltonoverip.com/blog/2014/10/tftp-server-on-debian/), then this (https://openwrt.org/toh/tp-link/tp-link_archer_c20_v4)
Problem: upon testing the tftp command, I get a "transfer timed out" error on "get tp_recovery.bin."
After some extensive searching, I have found suggestions to use xinetd, tftp, and tftpd (mainly through this post, the top solution: https://askubuntu.com/questions/457094/tftpd-hpa-server-timeout-from-client-side-please-help). However, no matter what combination or configuration I try, I cannot seem to get the transfer to go through. To my knowledge, I am only using UFW and not iptables, and I have UFW disabled. I followed all the instructions exactly and carefully, and even tried uninstalling it all and trying again. No matter what I do, I cannot seem to get this working. I'm sure the solution is dead simple, but this is my first ever experience with FTP (excluding as a user about a decade ago). Can anyone offer some insight into what I'm screwing up? Thanks!
Install a TFTP client on the PC and make sure you can TFTP to yourself. Use the Ethernet port IP address not "localhost".
I'm using Ubuntu 20 with in.tftpd in standalone mode (no xinetd). Also note that TFTP really is completely different from FTP.
Interesting. So I connected using tftp 127.0.0.1, and that worked. But connecting using the local IP from the router did not, either on the same machine or a separate machine on the same network. What does that indicate? Something wrong with my IP addressing?
Could be a firewall issue or tftpd is not listening on all interfaces.
Check that some program has indeed opened port 69:
sudo netstat -lp | grep tftp
udp 0 0 0.0.0.0:tftp 0.0.0.0:* 1235/in.tftpd
udp6 0 0 [::]:tftp [::]:* 1235/in.tftpd
Here we see that it is listening on non-specific IPv4 and IPv6.
The command line was:
/usr/sbin/in.tftpd --listen --user tftp --address :69 --secure /srv/tftp
I seem to be missing that second row, the udp6 row, but that's just IPv6 and it shouldn't matter, right? Otherwise my first line looks exactly like yours and I'm still getting the same result. My second line says "4796/in.tftpd" if that helps.
Btw I really appreciate your help, I was banging my head against the wall.
Yes the second row is IPv6 which isn't important here. The number before in.tftpd is the process ID number which varies. The important thing is the listen IP is all zeros meaning it isn't listening on a particular IP. For example if it was 127.0.0.1 it would only be listening on local loopback.
Your ethernet port should be set up with 192.168.0.66/24 IP, confirm with
ip addr show
It's always a good idea to plug a switch (unmanaged) between the router and the PC so that the PC port gets a constant carrier and doesn't drop and reconfigure when the router is switched off or rebooted. But no other network should be connected to the PC including wifi.
Can confirm. My "inet" is showing 192.168.0.66/24.
So when I tried the flash earlier, I unplugged everything except the server (including the network device). The server doesn't have wifi capabilities, and I don't have a switch on hand. Should I disable wifi on the router? I didn't do that last time, but I figured since the router doesn't have a WAN cable connected anyways it didn't matter. Is that what I was doing wrong?
After interrupting the router boot and having the bootloader CLI open, confirm that your PC is properly configured. The Ethernet link should be up steady then.
You may or may not be able to ping the router at 192.168.0.88. Usually not.
But if you can't even TFTP to yourself at 192.168.0.66 there is something wrong in the PC.
So the issue is the machine? Hmm, okay. I'll see about using instructions for a Windows FTP server temporarily. I have an old Windows machine available. I was just hoping having a Debian server lying around might save me some headache.