Wednesday, February 17, 2010

Setting up TFTPD in Linux

STEP 1:
Install tftpd and related packages.
$ sudo apt-get install xinetd tftpd tftp
STEP 2:
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
}
STEP 3:
Make /tftpboot directory
$ sudo mkdir /tftpboot
$ sudo chmod -R 777 /tftpboot
$ sudo chown -R nobody /tftpboot
STEP 4:
Start tftpd through xinetd
$ sudo /etc/init.d/xinetd start
STEP 5:
Testing. Tranfering file hda.txt from 192.168.1.100 (Client using tftp) to 192.168.1.101(Server 192.168.1.101).Get an example file to transfer (eg. hda.txt)
$ touch /tftpboot/hda.txt
$ chmod 777 /tftpboot/hda.txt
$ tftp 192.168.1.101tftp> put hda.txt
Sent 722 bytes in 0.0 secondstftp> get tftp>quit

TROUBLESHOOTING:
1:"Error 1: File could not be found"The above mentioned error might occur if we try to use "put" command
In that case try creating the same file name in the other computer also,then it will over write.

No comments: