TFTP Server on Debian

From Wiki of H. Kurth Bemis
Jump to navigation Jump to search

Setting up a TFTP server, in this topic, specifically for serving Asterisk phone configs, but really anything.

Basics

  1. Install tftpd-hpa
    sudo apt-get install tftpd-hpa
  2. After install, edit the default config
    nano /etc/default/tftpd-hpa
    and add --ipv4 and --create to the TFTP_OPTIONS line.
    • --ipv4 forces the daemon to listen only on ipv4 addresses/interfaces
    • --create enables the creation of files to be uploaded. Required for PolyCom phones to upload logs, configs and phonebooks
  3. The line should now look like this;
    TFTP_OPTIONS="--secure --create --ipv4"
  4. Ensure that the directory named in the config as TFTP_ROOT exists and is owned by the tftp user.
    • sudo mkdir -p /srv/tftp
    • sudo chown -R tftp.tftp /srv/tftp
  5. Start the TFTP server
    • service tftpd-hpa restart

Notes

  1. Ensure no firewalls, gateways or other packet filtering setup is blocking UDP port 69. nmap can check this via the following:
    • nmap -vvv -sU -p 69 D.S.T.IP