System Servicestftpfile-transfernetworkclientserverpxe

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

bash
sudo apt install tftp-hpa

Flags

-4Use IPv4
-6Use IPv6
-vVerbose mode
-lNot specified in usage
-m modeSet mode
-c commandExecute command
-t, --tftpd-timeout <value>Number of seconds of inactivity before exiting
-r, --retry-timeout <value>Time to wait for a reply before retransmission
-m, --maxthread <value>Number of concurrent threads allowed
-v, --verbose [value]Increase or set the level of output messages
--traceLog all sent and received packets
--no-timeoutDisable 'timeout' from RFC2349
--no-tsizeDisable 'tsize' from RFC2349
--no-blksizeDisable 'blksize' from RFC2348

Examples

Display usage help for the tftp client
tftp -h
General usage pattern for connecting to a TFTP host and executing commands
tftp [-4][-6][-v][-l][-m mode] [host [port]] [-c command]
Display usage help for the in.tftpd server
in.tftpd -h
Start the TFTP server serving the specified world-readable/writable directory (default /tftpboot)
in.tftpd [directory]
Start server with 10-second inactivity timeout serving /tftpboot
in.tftpd -t 10 /tftpboot
Start server with 5-second retry timeout and max 10 threads serving /tftpboot
in.tftpd -r 5 -m 10 /tftpboot
Start server in verbose mode with packet tracing serving /tftpboot
in.tftpd -v --trace /tftpboot
Updated 2026-04-16kali.org ↗