tftp-hpa
tftp-hpa provides an enhanced TFTP client and server for transferring files over the network, primarily for serving boot images to other machines via PXE. It includes bugfixes and enhancements over the original BSD TFTP implementation.
Description
Trivial File Transfer Protocol (TFTP) is a simple file transfer protocol mainly used to serve boot images over the network to other machines (PXE). The tftp-hpa package offers HPA's enhanced version of the BSD TFTP client and server, featuring numerous bugfixes and improvements over the original.
This package splits into two main components: the client (tftp-hpa and tftp) for initiating file transfers, and the server (tftpd-hpa and in.tftpd) for hosting files. The client supports IPv4 transfers, while the server can be configured to serve files from a specified directory, defaulting to /tftpboot, which must be world-readable and writable.
Use cases include network booting scenarios with PXE, quick file exchanges in penetration testing environments, and setting up lightweight file servers for diskless workstations. It is particularly useful in Kali Linux for network penetration testing tasks involving file transfers.
How It Works
TFTP operates over UDP using a simple request-response protocol for file get/put operations without authentication. tftp-hpa enhances the BSD implementation with better timeout handling, threading support, and RFC compliance features like tsize, blksize, and timeout options. The client connects to a host and port to issue commands, while the server listens in a directory, handling concurrent threads and retransmissions based on configured timeouts.
Installation
sudo apt install tftp-hpaFlags
Examples
tftp -htftp [-4][-6][-v][-l][-m mode] [host [port]] [-c command]in.tftpd -hin.tftpd [directory]in.tftpd -t 10 /tftpbootin.tftpd -r 5 -m 10 /tftpbootin.tftpd -v --trace /tftpboot