Ad Code

Ticker

6/recent/ticker-posts

Recent Posts

TFTP Server - How to install to your web server

Here's a quick tutorial on how to install TFTP (trivial file transfer protocol) server.

Login as root
Run command  yum install tftp-server to install the TFTP server
Edit the configuration file, vi /etc/xinetd.d/tftp, and you will some the following.
# default: off
# description: The tftp server serves files using the trivial file transfer 
#       protocol.  The tftp protocol is often used to boot diskless 
#       workstations, download configuration files to network-aware printers, 
#       and to start the installation process for some operating systems.
service tftp
{
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -s /tftpboot
        disable                 = yes
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}

Change disable = yes to disable = no to enable the tftp server

Start the TFTP server, run the command:
/sbin/service xinetd start

The default folder is /var/lib/tftpboot

Now let's test to get a file from your TFTP server
tftp 66.55.44.1 GET test ; this command will get a test file from 66.55.44.1 TFTP server

By the way, you can use www.ping.eu to check if your UDP port 69 is open.

Here's my source: http://www.webune.com/forums/how-to-install-tftp-server-in-linux.html

Troubleshooting:
+++
When you first run the tftp 66.55.44.1 get test_file, you see a similar error as shown below.

Error on server : File not found
Connect request failed.

Solution:
Go back to the configuration file, run vi /etc/xinetd.d/tftp and update the server arguments

server_args             = -c -s /tftpboot


Try it again, you will now be able to download the test_file.
+++
Although tftpd is installed correctly, the firewall is not allowing outgoing connections. It appears that the ip_conntrack_tftp kernel module would need to be installed for tftp connections to completely work. Unfortunately, this cannot be installed on a VPS server; a dedicated server would be required.

Alternative Solution for VPS server:
Disable CSF (firewall front-end software). Please note, disabling firewall is not recommended.

+++

Tools:
Windows 7 Professional for TFTP client
VPS server for testing TFTP server
Solarwind free tool for TFTP server and client


Thank you.

If this helped you, please take the time to share this post by sharing using Google+, Facebook, Twitter, or LinkedIn


Post a Comment

1 Comments

  1. Nice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post
    dui lawyer king george va

    ReplyDelete

Comments

Ad Code