Ubuntu Configuration TFTP Service:
TFTP is the simplest network protocol used to download remote files, based on the UDP protocol. XINETD is a new generation of network daemon services that are often used to manage a variety of lightweight Internet services.
sudo apt-get install TFTP
sudo apt-get install tftpd (tftp-server)
sudo apt-get install xinetd
Modify/etc/xinetd.d/tftp file: Server_args=-s/var/lib/tftpboot to server_args=-s/tftpboot/-C
Modify/etc/sysconfig/selinux file: selinux=disabled change to Disabled (firewall off)
mkdir Tftpboot Create tftpboot (root directory), and then write a test file in the directory (tftpd parameters direction write the location of the file you want to use for transfer, for example, my is the root directory of the/tftpboot)
chmod 777/tftpboot
Service xinetd Restart Restart xinetd
To see if the TFTP service is turned on: netstat-a | grep tftp display result: UDP 0 0 *:tftp *:* indicates that the service is enabled and the TFTP configuration is successful
Go to another directory, or CD ~ (home directory)
sudo in.tftpd-l/tftpboot start the TFTP server
TFTP native IP address, and then enter the GET or put command on the TFTP command line
Tftp>get A (filename) download files on the server
Tftp>put A (filename) upload the file to the server
Tftp>q exit
Some of the problems and causes (solutions):
1, Transfer time out.
TFTPD service does not start, if not resolved, you can try to switch to bridge mode
2. Error Code 0:permission denied
may be caused by selinux, turn it off:
Modify the file/etc/sysconfig/selinux, set the selinux=disabled, and then restart the computer
or execute the command System-config-securitylevel open the Security Level Configuration dialog box to change the SELinux (S) option to "Allow"
3. Error code 1:file not found
The specified folder does not exist, or the-C option is not specified in the TFTPD startup parameter, allowing uploading of files
4. Error code 2:only Absolute filenames allowed
/ETC/XINETD.D/TFTPD file is not set up, just need to change the server_args= to your own set of server folder on the line.
5. Error Code 2:access violation
Upload the file to have the corresponding read-write (overwrite) permission to upload, to modify the permissions of the file chmod 777 a (file name)
To start the TFTP server:
Service TFTPD-HPA stop to stop the TFTP server
Service TFTPD-HPA start to open the TFTP server
Service TFTPD-HPA stutus view tftp run status
Service TFTPD-HPA Restart Restart TFTP server
(Note: File permissions change after file transfer)
To enter the TFTP operation:
Connect: Connecting to a remote TFTP server
Mode: File transfer modes
Put: Uploading Files
Get: Download file
Quit: Quit
VERBOSE: Show detailed processing information
Tarce: Show Package path
Status: Displays current status information
Binary: Binary transfer mode
Ascii:ascii Transfer Mode
REXMT: Set time-out for packet transfer
Timeout: Set the time-out for retransmission
Help: Helpful Information
? : Help Information
-g means download file (get)
-p means upload file (put)
-L = Local file name (locally file)
-R indicates the remote host's file name (remotely file)
For example, to download Embedexpert from a remote host 192.168.1.2, you would enter the following command:
Tftp-g-R Embedexpert 192.168.1.2
Ubuntu Configuration TFTP Service