User Tools

Site Tools


informatique:linux:tftpd

This is an old revision of the document!


Pour installer le service TFTPd :

yum install tftp-server

Le service tftpd est géré par xinetd. Ce dernier gère le port d'écoute du tftp et lance le daemon si une requête valide arrive. Après un certain timeout d'inactivité, le service tftpd est coupé par xinetd.

Son fichier de configuration est à placer dans /etc/xinetd.d/tftp :

service tftp
{
        disable                 = no
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
#       server_args             = -s /var/lib/tftpboot
        server_args             = -c -vvv -u nobody -s /home/dude/ftp
#       disable                 = yes
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
# options verbeuses pas utiles mais PI :
#       port                    = 69
}

Puis redémarrer xinetd (attention ça coupera les service dépendant de ce dernier) :

service xinetd restart

Avec cette configuration, les fichiers transférés seront loggués dans /var/log/messages :

Oct  5 11:39:03 srv-tftp xinetd[2505]: START: tftp pid=2712 from=10.1.2.232
Oct  5 11:48:10 srv-tftp in.tftpd[2527]: WRQ from 10.1.2.232 filename test.txt
Oct  5 11:48:10 srv-tftp in.tftpd[2585]: WRQ from 10.1.2.232 filename test2.txt
Oct  5 10:48:44 srv-tftp xinetd[2505]: EXIT: tftp status=0 pid=1360 duration=903(sec)
informatique/linux/tftpd.1475661882.txt.gz · Last modified: 2016/10/05 10:04 by pteu