Install and configure TFTP under Ubuntu

Install and configure TFTP under Ubuntu

Steps : 

install tftpd-hpa

apt-get install tftpd-hpa

edit the config file

sudo vi /etc/default/tftpd-hpa

change the content as per your requirement : ( my setup as below)

# /etc/default/tftpd-hpa
TFTP_USERNAME=”tftp”
TFTP_DIRECTORY=”/tftp”
TFTP_ADDRESS=”0.0.0.0:69″
TFTP_OPTIONS=”–secure -c -vv -i”

write and quit

after your config file is ready to rock and roll press Esc then :WQ

create the directory files will reside in

mkdir /tftp

change permissions and ownership

sudo chmod -R 777 /tftp
sudo chown -R nobody /tftp

restart service to get new config effective

/etc/init.d/tftpd-hpa restart

please note you need to open up firewall and or configure port forwarding. ( if you have FW between your network and TFTP Server)

UDP port is set to 69

Testing :

FW1/pri/act# copy running-config tftp://192.168.1.67/      —– My TFTP IP address, change as per your server IP

Source filename [running-config]?

Address or name of remote host [192.168.1.67]?

Destination filename [running-config]?
Cryptochecksum: bfa1e11d 5720c265 0f7453c8 aa90c815
!!
7416 bytes copied in 0.230 secs

Checking TFTP Server :

root@syslog:~# ls /tftp/
running-config

Good Luck ! Happy reading….