Install tftpd-hpa
#apt-get install tftpd-hpa
Allow UDP 69, eg:
iptables -A INPUT -p udp --dport 69 ACCEPT iptables -A INPUT -m state --state NEW -p udp --dport 69 ACCEPT
The configuration is at /etc/default/tftpd-hpa
A simple configuration that may be used to give a bin to a cisco at boot from 10.2.24.10.
#cat /etc/default/tftpd-hpa # /etc/default/tftpd-hpa TFTP_USERNAME="tftp" TFTP_DIRECTORY="/var/lib/tftpboot" #TFTP_ADDRESS="0.0.0.0:69" TFTP_ADDRESS="10.2.24.10:69" TFTP_OPTIONS="--secure"
The files are served from /var/lib/tftpboot.
To boot cisco put the bin(s) at /var/lib/tftpboot and restart tftpd-hpa
#/etc/init.d/tftpd-hpa
To test the tftp server one could install a tftp client and attempt to get a file eg:
# apt-get install tftp $ tftp 10.2.24.10 tftp> mode bin tftp> mode binary tftp> get c1600-k8osy-mz.123-26.bin Received 7149311 bytes in 3.6 seconds tftp> quit
URI:tftp server
TFTP server Debian GNU Linux