Personal tools

Difference between revisions of "Installing and Testing TFTP Server in Ubuntu"

From hpcwiki

Jump to: navigation, search
(Installing and Testing TFTPD Server in Ubuntu)
(Installing and Testing TFTPD Server in Ubuntu)
 
Line 14: Line 14:
 
  disable        = no
 
  disable        = no
 
  }
 
  }
 +
* Create a folder /tftpboot  this should match whatever you gave in server_args. mostly it will be tftpboot
 +
sudo mkdir /tftpboot
 +
sudo chmod -R 777 /tftpboot
 +
sudo chown -R nobody /tftpboot
 +
* Restart the xinetd service
 +
sudo /etc/init.d/xinetd stop
 +
sudo /etc/init.d/xinetd start
 +
 +
'''Now our tftp server is up and running.'''
 +
 +
'''Testing our tftp server'''
 +
 +
* Create a file named test.txt with some content in /tftpboot path of the tftp server
 +
 +
* Obtain the ip address of the tftp server using ifconfig command
 +
 +
* Now in some other system follow the following steps.
 +
 +
tftp "ipServerTftp
 +
tftp> get test
 +
Sent 159 bytes in 0.0 seconds
 +
tftp> quit

Latest revision as of 15:37, 16 June 2015

[edit] Installing and Testing TFTPD Server in Ubuntu

  • Install following packages.
sudo apt-get install xinetd tftpd tftp
  • Create /etc/xinetd.d/tftp and put this entry
service tftp
{
protocol        = udp
port            = 69
socket_type     = dgram
wait            = yes
user            = nobody
server          = /usr/sbin/in.tftpd
server_args     = /tftpboot
disable         = no
}
  • Create a folder /tftpboot this should match whatever you gave in server_args. mostly it will be tftpboot
sudo mkdir /tftpboot
sudo chmod -R 777 /tftpboot
sudo chown -R nobody /tftpboot
  • Restart the xinetd service
sudo /etc/init.d/xinetd stop
sudo /etc/init.d/xinetd start

Now our tftp server is up and running.

Testing our tftp server

  • Create a file named test.txt with some content in /tftpboot path of the tftp server
  • Obtain the ip address of the tftp server using ifconfig command
  • Now in some other system follow the following steps.
tftp "ipServerTftp
tftp> get test
Sent 159 bytes in 0.0 seconds
tftp> quit