How to log tftp-hpa

I'm trying to flash a TP-LINK router using this guide:-


I tried FreeBSD's built in tftpd but that didn't work so I've installed ftp/tftp-hpa using this guide:-

(not the easiest pkg to install)

but still can't make it work.

Is there any way of creating a log to show that the router has at least attempted to access my tftp server? I've looked at how to enable logging and the only thing I can think of is to add '--verbose' to tftpd-flags in /etc/rc.conf.
There is also a '--verbosity x' option available but I don't what levels are available.

If I can enable logging should I be able to see what time an attempt was made to access the server, and from where.
And where should I expect to find such a log? /var/log/messages?
 
Why didn't that work? And what exactly didn't work?
How can I tell why it didn't work when I can't find a log?

All I can say is that the router didn't get flashed. It maybe that I didn't press the buttons at exactly the right moment to trigger flashing, it could be that the router couldn't find the tftp server and it couldn't find the correct file or maybe something else. Without a log it's just guesswork.
 
How can I tell why it didn't work when I can't find a log?

All I can say is that the router didn't get flashed. It maybe that I didn't press the buttons at exactly the right moment to trigger flashing, it could be that the router couldn't find the tftp server and it couldn't find the correct file or maybe something else. Without a log it's just guesswork.
From the tftpd man page:
-l Log all requests using syslog(3) with the facility of LOG_FTP.
Note: Logging of LOG_FTP messages must also be enabled in the
syslog configuration file, syslog.conf(5).

Remove any tftpd/tftp entries you made in rc.conf and follow https://wiki.freebsd.org/PXE:TFTPd Setup but go to /etc/inted.conf. Uncommenting the tftp line mentioned in the guide also starts logging since -l option is in command argument section. I think it should log to /var/log/messages by default, but I may be wrong on that.
 
Yes, you can have the access logged. But it's not going to log anything if the device doesn't even try to fetch the file. So I would at least verify with tcpdump(1) if you can see the TFTP request. If there's no request at all then the device just isn't being triggered properly.

You often need to do this on a separate network:
Code:
At that point, the bootloaders integrated tftp client with the ip address of 192.168.1.1, tries to connect to a tftp server running at address 192.168.0.66 and getting the file named ArcherC2V1_tp_recovery.bin
That means the TFTP server has to be running on 192.168.0.66, the device itself apparently defaults to 192.168.1.1 in this mode. So it's probably best if you do this on a 'stand-alone' network with the TFTP server specifically configured with IP 192.168.0.66.
 
Back
Top