Skip to main content

Setup TFTP Server in RHEL/CentOS 7

Welcome to My Blog, It is my First Blog I hope I will continue with more topics on Linux, HP-UX, Oracle, WebLogic Server, Oracle Secure Backup and much more.


What is TFTP-Server

Trivial File Transfer Protocol (TFTP) is an Internet software utility for transferring ãles that is simpler to use than the File Transfer Protocol (FTP) but less capable. It is used where user authentication and directory visibility are not required. TFTP uses the User Datagram Protocol (UDP) rather than the Transmission Control Protocol (TCP).


1. Install tftp-server and xinetd is also required

# yum install -y tftp tftp-server* xinetd*



2.  Edit "/etc/xinetd.d/tftp" – set disable to no and add -c option into server_args to upload files to TFTP-Server from clients.

# vim /etc/xinetd.d/tftp

service tftp
{

         socket_type = dgram
         protocol = udp
         wait = yes
         user = root
         server = /usr/sbin/in.tftpd
         server_args = -c -s /tftpboot
         disable = no
         per_source = 15
         cps = 80 2
         flags = IPv4
}


3. Enable and Start TFTP Service

# systemctl start xinetd
# systemctl start tftp

# systemctl enable xinetd
# systemctl start tftp

After these two commands, permanent links will be made for xinetd and TFTP services.


4. Configure SELinux for TFTP service.

      check the tftp permissions in SELinux

# getsebool -a | grep tftp
 
   tftp_anon_write –> off
   tftp_home_dir –> off

     If the TFTP write is off as shown above, enable it with setsebool command as below

# setsebool -P tftp_anon_write 1
# setsebool -P tftp_home_dir 1


5. Configure Firewall for TFTP Service

# firewall-cmd --permanent --add-service=tftp -zone=public
# firewall-cmd --permanent --add-port=69/udp
# firewall-cmd --reload


6. Restart TFTP Service

# systemctl restart xinetd
# systemctl restart tftp



How to download and upload files to TFTP Server

From Windows system, with CMD

Download Files
[192.168.1.100 is TFTP-Server]

c:\>  tftp -i 192.168.1.100 get filename

Upload Files

c:\> tftp -i 192.168.1.100 put filename



Share My Blog & offer your comments and suggestions !!

Thank You !!

Comments

Post a Comment

Popular posts from this blog

Mount ISO image in HP-UX 11i v3

ISO image is an archive file that could be written to a optical disc(CD/DVD). ISO images can be created from optical discs by disc imaging software (freely available on internet) or from a collection of files.  In HP-UX 11i v3 by default we can't mount .iso images we need a kernel module "fspd". it is Dynamically Loadable Kernel Module (DLKM).we need to install ISOIMAGE-ENH product which deliver this fspd DLKM. You can download this product by following link : https://h20392.www2.hpe.com/portal/swdepot/displayProductInfo.do?productNumber=ISOIMAGE-ENH After installation of ISOIMAGE-ENH load fspd module  To Load fspd Module # kcmodule fspd=loaded To unload fspd Module # kcmodule fspd=unused And here is how it works very simply: Create a directory to mount iso image on it.  # mkdir /rhel_iso # mount /soft/iso_images/RHEL-5.1-IA64-CD1.iso /rhel_iso Share my Blog and post questions and opinions in  comments !!

Update HP-UX Operating Environment (OE)

Hello Readers, Today I am describing how to update Operating Environment of HP-UX Operating System, Update OE steps are written below. Have a look.... 1. Check current OE version details 2. Download CD/DVD of Latest Operating Environment or HP-UX Operating System. 3. Create a Depot of OS Depot to update.  4. Run update in preview mode for any errors and warnings.  5. If update runs in preview mode successfully, Run update without Preview mode.  1. Checkup current OE version details # swlist | grep -i OE    HPUX11i-VSE-OE       B.11.31.1603   HP-UX Virtual Server Operating Environment You may see in output, currently it is of  March 2016 Virtual Server Operating Environment 2. Download CD/DVD of Latest Operating Environment or HP-UX Operating System. First download latest iso of HPUX Operating System and create a software depot from it How to mount iso images in HPUX system you may study my anoth...

HP-UX 11.31-Restore a single file/Directory from Ignite Backup (Tape and Net Recovery)

Hello Friends, This topic is related with HP-UX Operating System. In HP-UX Operating System Ignite is one of the hpux feature by which OS recovery image is being created in ignite server and external Tape cartridges which can be later used to restore OS in case of system crash. (In later Posts I will write about ignite server setup and ignite restoration techniques). Today I will write how to restore a single file or Directory from ignite backup in two cases, First is when we have ignite backup on Tape cartridge and Second is when we have ignite backup in Ignite Server. 1. From the Ignite Tape (assuming 2mn for tape device): # mt -f /dev/rmt/2mn rewind # mt -f /dev/rmt/2mn fsf 1     <– for PA-RISC System (and) # mt -f /dev/rmt/2mn fsf 22    <– for Itanium/Integrity System Use below command to restore file '/etc/lvmtab' # tar xvf /dev/rmt/2mn  etc/lvmtab NOTE : No leading '/'  (absolute path is to be used at time of restorati...