Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fedora - How to setup an anonymous FTP download server

#1
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 using sudo:

$ sudo dnf install vsftpd

Enable the vsftp server.

$ sudo systemctl enable vsftpd

Next, edit your /etc/vsftpd/vsftpd.conf file to allow anonymous downloads. Make sure you have the following entries.

anonymous_enable=YES

This option controls whether anonymous logins are permitted or not. If enabled, both the usernames ftp and anonymous are recognized as anonymous logins.

local_enable=NO

This option controls whether local logins are permitted.

write_enable=NO

This option controls whether any FTP commands which change the filesystem are allowed.

no_anon_password=YES

When enabled, this option prevents vsftpd from asking for an anonymous password. With this setting, the anonymous user will log straight in without one.

hide_ids=YES

Enable this option to display all user and group information in directory listings as ftp.

pasv_min_port=40000
pasv_max_port=40001

Finally, 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.

$ firewall-cmd --add-service=ftp --perm
$ firewall-cmd --add-port=40000-40001/tcp --perm
$ firewall-cmd --reload

Next, configure SELinux to allow passive FTP:

$ setsebool -P ftpd_use_passive_mode on

And finally, start the vsftp server:

$ systemctl start vsftpd

At 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/...ad-server/
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Fedora - How to configure an SSH proxy server with Squid xSicKxBot 0 1,556 07-18-2020, 03:19 AM
Last Post: xSicKxBot
  Fedora - How to get MongoDB Server on Fedora xSicKxBot 0 1,578 02-18-2020, 12:41 PM
Last Post: xSicKxBot
  Fedora - Build your own cloud with Fedora 31 and Nextcloud Server xSicKxBot 0 1,667 01-28-2020, 05:00 AM
Last Post: xSicKxBot
  Fedora - How to setup a DNS server with bind xSicKxBot 0 1,573 01-14-2020, 06:50 AM
Last Post: xSicKxBot
  Fedora - How to setup multiple monitors in sway xSicKxBot 0 1,518 01-09-2020, 05:29 AM
Last Post: xSicKxBot
  Fedora - How to set up a TFTP server on Fedora xSicKxBot 0 1,778 09-11-2019, 05:22 PM
Last Post: xSicKxBot
  Fedora - Fedora job opening: Fedora Community Action and Impact Coordinator (FCAIC) xSicKxBot 0 1,680 07-11-2019, 10:39 AM
Last Post: xSicKxBot
  Fedora - Contribute at the Fedora Test Day for Fedora Modularity xSicKxBot 0 1,826 03-28-2019, 11:12 PM
Last Post: xSicKxBot
  Kubernetes Setup Using Ansible and Vagrant xSicKxBot 0 1,647 03-19-2019, 10:14 PM
Last Post: xSicKxBot
  Fedora - How to Build a Netboot Server, Part 4 xSicKxBot 0 1,778 01-14-2019, 02:18 PM
Last Post: xSicKxBot

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB Theme © iAndrew 2016