Installing TFTPd Server on Ubuntu

First, install xinetd, tftpd, and tftp via APT

	
sudo apt-get install xinetd tftpd tftp -y
	

Next, create the configuration file

	
sudo vim /etc/xinetd.d/tftp
	

Then, edit the configuration file to include the following:

	
service tftp
{
	protocol = udp
	port = 69
	socket_type = dgram
	wait = yes
	user = nobody
	server = /usr/sbin/in.tftpd
	server_args = /tftpboot -s
	disable = no
}
	

After that, create the tftpboot directory in your location of choice

	
sudo mkdir /tftpboot
	

Change ownership and permissions of the directory

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

Finally, start the service through Xinetd

	
sudo service xinetd start
	

Thats it! You can now connect to this TFTPd server for uploads and downloads. This is that handy little thing that might save you when you need to do something like boot an ASR from tftpd because you accidentally formatted bootflash...more on that some other time :)

	
boot tftp://192.168.10.15/tftpboot/asr1001x-universalk9.03.12.01.S.154-2.S1-std.SPA.bin
	


 

© 2019