Configure tftpd-hpa TFTP server
Install the tftpd-hpa package:
sudo apt-get install tftpd-hpa
After installation, edit the file
sudo nano / etc / default / tftpd-hpa
containing server settings. Let's bring it to the following form:
TFTP_USERNAME = "tftp"
TFTP_DIRECTORY = "/ var / tftp"
TFTP_ADDRESS = "0.0.0.0:69"
TFTP_OPTIONS = "- ipv4 --secure --create --umask 027 --permissive"
In the settings are additional options:
create allows the server to create new files,
ipv4 instructs it to wait for connections only on IPv4 addresses,
umask instructs to reset the write bit for the group and all access bits for other users,
permissive instructs not to carry out any file permissions checks in excess of the operating system.
Create a directory for the tftp server, give the server access to the directory:
sudo mkdir / var / tftp
sudo chown tftp: tftp / var / tftp
You can also change the home directory of the tftp user in the / etc / passwd file to / var / tftp.
Now we just write the ip addresses we need through the gnome network manager and that's it.
It remains to restart the daemon to start working with the new directory:
sudo /etc/init.d/tftpd-hpa restart