![]() |
|
Fedora - How to setup an anonymous FTP download server - Printable Version +- Sick Gaming (https://sickgaming.net) +-- Forum: Computers (https://sickgaming.net/forum-86.html) +--- Forum: Linux, BSD & Unix (https://sickgaming.net/forum-88.html) +--- Thread: Fedora - How to setup an anonymous FTP download server (/thread-92133.html) |
Fedora - How to setup an anonymous FTP download server - xSicKxBot - 10-23-2019 How to setup an anonymous FTP download server Sometimes you may not need to set up a full FTP server with authenticated users with upload and download privileges. If you are simply looking for a quick way to allow users to grab a few files, an anonymous FTP server can fit the bill. This article shows you show to set it up. This example uses the vsftp server. Installing and configuring the anonymous FTP server Install the vsftp server usingsudo: Code: $ sudo dnf install vsftpdEnable the vsftp server. Code: $ sudo systemctl enable vsftpdNext, edit your /etc/vsftpd/vsftpd.conf file to allow anonymous downloads. Make sure you have the following entries. Code: anonymous_enable=YESThis option controls whether anonymous logins are permitted or not. If enabled, both the usernames ftp and anonymous are recognized as anonymous logins. Code: local_enable=NOThis option controls whether local logins are permitted. Code: write_enable=NOThis option controls whether any FTP commands which change the filesystem are allowed. Code: no_anon_password=YESWhen enabled, this option prevents vsftpd from asking for an anonymous password. With this setting, the anonymous user will log straight in without one. Code: hide_ids=YESEnable this option to display all user and group information in directory listings as ftp. Code: pasv_min_port=40000
pasv_max_port=40001Finally, these options set the minimum and maximum port to allocate for PASV style data connections. Use them to specify a narrow port range to assist firewalling. You should choose a range for ports that aren’t currently in use. This example uses port 40000-40001 to limit the ports to a range of 1. Final steps Now that you’ve set the options, add the appropriate firewall rules to allow vsftp connections along with the passive port range you specified. Code: $ firewall-cmd --add-service=ftp --perm
$ firewall-cmd --add-port=40000-40001/tcp --perm
$ firewall-cmd --reloadNext, configure SELinux to allow passive FTP: Code: $ setsebool -P ftpd_use_passive_mode onAnd finally, start the vsftp server: Code: $ systemctl start vsftpdAt this point you have a working FTP server. Place the content you want to offer in /var/ftp. (Typically, system administrators put publicly downloadable content under /var/ftp/pub.) Now you can connect to your server using an FTP client on another system. Image courtesy of Tom Woodward on Flickr, CC-BY-SA 2.0. https://www.sickgaming.net/blog/2019/10/22/how-to-setup-an-anonymous-ftp-download-server/ |