04 October, 2013

Configure TFTP Server In Debian

#Before you download aftpd server, remove all old tftp servers from your linux 
apt-get remove tftp tftpd
apt-get remove xinetd
ps axu | grep tftp
rm /etc/xinetd.d/tftp
rm -r /tftpboot

#Download inetd, inetutils-inetd and atftpd
apt-get install inetd
apt-get install inetutils-inetd
apt-get install atftpd

#Create User
mkdir /home/backup
adduser backup -d /home/backup

#Change Permission, Owner and Group
chmod 750 /home/backup
chmod 750 /home/backup/Network/
chown -R backup:backup /home/backup

#Cheack Permission
drwxr-x--- 3 backup backup 4096 Oct  3 13:44 backup
drwxr-x--- 2 backup backup 4096 Oct  4 11:01 Networkp

#Configure Your Server 
nano /etc/inetd.conf

#:BOOT: TFTP service is provided primarily for booting.  Most sites
#       run this only on machines acting as "boot servers."
tftp dgram udp4 wait backup /usr/sbin/tcpd /usr/sbin/in.tftpd --tftpd-timeout 300 --retry-timeout 5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100 --verbose=5 /home/backup/Network

#Restart tftp
/etc/init.d/inetutils-inetd restart

Note: Nmap scan 

nmap -sU -p69 10.0.10.100 
Nmap scan report for 10.0.10.100
PORT        STATE            SERVICE
69/udp    open|filtered      tftp

-p69 = Scan Port 69 
-sU = Only UDP