Computer And Technologies

Computer And Technologies: Setup tftp server in Ubuntu Linux

Thursday, 7 May 2009

Setup tftp server in Ubuntu Linux

This is a quick description of how to install and setup a tftp server in Ubuntu.

1. Install tftpd and related packages.

$ sudo apt-get install xinetd tftpd tftp

2. Create /etc/xinetd.d/tftp file 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

}

3. Make /tftpboot directory

$ sudo mkdir /tftpboot

$ sudo chmod -R 777 /tftpboot

$ sudo chown -R nobody /tftpboot

4. Start tftpd through xinetd

$ sudo /etc/init.d/xinetd restart

5. Testing. Tranfering file test.txt from 192.168.1.100 (Client using tftp) to 192.168.1.100 (Server 192.168.1.100). Get an example file to transfer (eg. test.txt)

$ touch /tftpboot/test.txt

$ chmod 777 /tftpboot/test.txt

$ ls -l /tftpboot/

total 0

-rwxrwxrwx 1 amareshcd amareshcd 0 2006-03-27 23:04 test.txt

$ tftp 192.168.1.100

tftp> put test.txt

Sent 722 bytes in 0.0 seconds

tftp> quit

$ ls -l /tftpboot/

total 4

-rwxrwxrwx 1 amareshcd amareshcd 707 2006-03-27 23:07 test.txt

No comments:

Post a Comment