Fading Coder

One Final Commit for the Last Sprint

Home > Tech > Content

Setting Up NFS and TFTP Services on Ubuntu

Tech 1

Network File System (NFS) Configuration

Install the required NFS server packages:

sudo apt install nfs-kernel-server nfs-common

Create a directory to act as the shared resource:

sudo mkdir -p /srv/nfs_share

Define the access rules in the configuration file:

sudo nano /etc/exports
# Append the following line to grant read/write access to a specific subnet
/srv/nfs_share 10.0.0.0/24(rw,sync,no_root_squash,no_subtree_check)

Apply the new export settings and verify the active configuration:

sudo exportfs -rav
sudo exportfs -v

Trivial File Transfer Protocol (TFTP) Configuration

To avoid timeout issues associated with older xinetd setups, utilize the standalone tftpd-hpa daemon directly. Install the necessary packages:

sudo apt install tftpd-hpa tftp-hpa

Modify the default configuration to specify the target directory and enable file creation:

sudo nano /etc/default/tftpd-hpa
# Update the configuration as follows:
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/srv/tftp_root"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure --create"

Establish the designated directory, assign the appropriate ownership, and set the required permissions:

sudo mkdir -p /srv/tftp_root
sudo chown -R tftp:tftp /srv/tftp_root
sudo chmod -R 775 /srv/tftp_root

Restart the service to apply changes:

sudo systemctl restart tftpd-hpa

Validate the connection by retrieving a test file:

tftp localhost
tftp> get test_kernel.img
tftp> quit

Related Articles

Understanding Strong and Weak References in Java

Strong References Strong reference are the most prevalent type of object referencing in Java. When an object has a strong reference pointing to it, the garbage collector will not reclaim its memory. F...

Comprehensive Guide to SSTI Explained with Payload Bypass Techniques

Introduction Server-Side Template Injection (SSTI) is a vulnerability in web applications where user input is improper handled within the template engine and executed on the server. This exploit can r...

Implement Image Upload Functionality for Django Integrated TinyMCE Editor

Django’s Admin panel is highly user-friendly, and pairing it with TinyMCE, an effective rich text editor, simplifies content management significantly. Combining the two is particular useful for bloggi...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.