Tuesday, September 16, 2008

How to setup TFTP server on Debian

Step 1: Installation of tftpd package (server) and client
aptitude install tftpd
aptitude install tftp

Step 2: Creating Directory and setting permission
mkdir /tftpboot
chmod 777 /tftpboot
chown imran.imran /tftpboot

Step 3: Checking and editing(if required) the /etc/inetd.conf
Correct the location of director from /srv/tftp to /tftpboot

tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot

Don't forget to restart.
It is is tricky to restart the tftpd, you have to restart inetd, but in Debian it is openbsd-inetd
cd /etc/init.d
./openbsd-inetd restart

Step 4: Testing
Type following

Step 5: Security

you can edit /etc/hosts.allow and /etc/hosts.deny for restriction.

That's it.

Further doc



Paul Knipp said...

Thanks, this worked great!

Sharad said...

Thanks, that was helpfull

RonaldMigahil said...

Just the help I needed.
Thanks from Ecuador - South America

Chris said...

why chmod 777 /tftpboot ?

Only the user 'running' tftpd should have 'write' permission. Others just read.

Anonymous said...


Eric said...

Best Debian guide I could find, thank you!