Simple ftp-tftp
We can choose tftp for small file transmission or simple transmission, especially for embedded development.
1. Install
sudo apt-get install xinetd tftp tftpd
(1) xinetd (eXtended InterNET services daemo): ftpd daemprocess
① Standard Internet services: telnet and ftp.
② Information Service: finger, netstat, and comment.
③ Mail service: imap, imaps, pop2, pop3, and pops.
④ RPC service: rquotad, rstatd, rusersd, sprayd, and walld.
⑤ BSD service: comsat, exec, login, ntalk, shell, and talk.
⑥ Internal services: chargen, daytime, echo, servers, services, and time.
7. Security Service: irc.
Other services: name, tftp, and uucp.
(2) tftp: ftp client (3) tftpd: ftp Server
2. Configure the xinetd. conf file in Ubuntu. The file location is/etc/xinted. conf. Insert the following on "includedir/etc/xinetd. d:
service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftpboot disable = no }
"/Tftpboot" in server_args is the root directory of ftp. This directory can be customized.
3. Create the ftp server root directory
sudo mkdir /tftpboot
4. xinetd Process Management (1) Restart
/etc/init.d/xinetd restart
(2) Start
/etc/init.d/xinetd start
(3) Stop
/etc/init.d/xinetd stop
5. iptables rules by default, iptables blocks ftp processes. Therefore, we need to add rules to enable ftp communication.
#sudo iptables -A OUTPUT -p UDP --dport 69 -j ACCEPT#sudo iptables -A INPUT -p UDP --dport 69 -j ACCEPT#sudo iptables-save
About: VSFTP and TFTP
VSFTP is a GPL-based FTP server software released on Unix-like systems. Its full name is Very Secure FTP, which can be seen from this name. The Compiler's original intention is code security. Security is the original intention of VSFTP writing. In addition to the inherent security features, high speed and high stability are also two important features of VSFTP. In terms of speed, when using ASCII code mode to download data, VSFTP is twice the speed of Wu-FTP. If the Linux host uses 2. 4. * The download speed of the kernel on Gigabit Ethernet is up to 86 MB/S. In terms of stability, VSFTP is even better. VSFTP supports simultaneous connection of more than 4000 concurrent users on a single machine (non-cluster). According to the data of Red Hat Ftp Server (ftp.redhat.com, the VSFTP server supports 15000 concurrent users. TFTP is a simple protocol for transferring files. It is implemented based on the UDP protocol, but we cannot determine that some TFTP protocols are based on other transmission protocols. This protocol is designed to transfer small files. Therefore, it does not have many FTP functions. It can only obtain or write files from the file server, but cannot list directories, and does not perform authentication. It transfers 8-bit data. There are three transmission modes: netascii, which is an eight-bit ASCII code format; octet, which is an eight-bit source data type; the last mail is no longer supported, it directly returns the returned data to the user rather than saving it as a file.