![]() You may run the following command to verify the firewall rules that were just added: sudo ufw status The firewall is already active and enabled on my system. Ignore, if it gives a warning about the disruption of SSH connection. ![]() ![]() Now run the firewall by using the following command. Open the ports 40000:45000 for passive FTP as well: sudo ufw allow 40000:45000/tcp Once everything is set up, open the default ports 20 and 21 for FTP: sudo ufw allow 20:21/tcp Best ftp server for ubuntu 20.04 install#Use the following command to install OpenSSH on your system: sudo apt install ssh If you get an error “ERROR: Could not find a profile matching ‘OpenSSH’” then you first need to install OpenSSH before running the above command. But first, let’s allow SSH by using the command given below otherwise we may get locked out of our server: sudo ufw allow OpenSSH We will open ports 20 and 21, the default/recommended ports for FTP, and ports 40000:45000 for passive FTP. Now we will configure the firewall to allow FTP traffic. Best ftp server for ubuntu 20.04 how to#Now run the following command to restart the VSFTPD service: sudo systemctl restart vsftpd How to Configure the Firewall For FTP on Ubuntu Press Ctrl + X and then hit Enter to save and exit the text file. You can set the configuration rules according to your own needs. These configuration settings are very basic. To allow only certain users to access VSFTPD, copy the below given lines at the end of the configuration file: To allow the FTP user to modify the filesystem, search for the following line in the configuration file and uncomment it by removing the ‘#’ (hash) symbol from the beginning of the line: The connection is established by the server in active mode whereas in the passive mode the connection is established by the client’s side. The system will connect a random port from the range you’ve chosen. You can give any range of ports to the configuration file. To allow VSFTPD to work on passive mode copy the below-given lines into your configuration file: VSFTPD works on the active mode by default. To only allow local users to access FTP server, make sure your configuration file matches the one given below: Update the following configuration settings: Here we will use nano to open the configuration file: sudo nano /etc/nf Open the configuration file in any text editor. The configuration rules of vsftpd are stored in /etc/nf. Now we will configure the newly installed vsftpd. Now verify the successful installation of VSFTPD by executing the following command: sudo systemctl status vsftpd Use the command given below to install VSFTPD.: sudo apt update sudo apt install vsftpd We will start off by installing it on our system. VSFTPD is the default FTP server for most Linux distributions.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |