TFTP Server in Ubuntu

  1. Install following packages.
    sudo apt-get install xinetd tftpd tftp
    
  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
    }
    
  3. Create a folder /tftpboot this should match whatever you gave in server_args. mostly it will be tftpboot
    sudo mkdir /tftpboot
    sudo chmod -R 777 /tftpboot
    sudo chown -R nobody /tftpboot
    
  4. Restart the xinetd service.
    sudo /etc/init.d/xinetd restart
    
    Now our tftp server is up and running.

    ## TFTP from Target
    GET: tftp -l [local file name] -r [remote file name] -g [server Ip]
    PUT: tftp -l [local file name] -r [remote file name] -p [server Ip]