

If you only want ftpuser to log in via FTP, you should disable their SSH access by blacklisting their username in the SSH config file. You can just press ENTER to each of these. You may also be asked to enter some contact information. Generate a strong password and keep it safe.


In this example, we will create a new user called ftpuser. We will now create a new user that we will use to log into FTP. Status: activeĢ0/tcp ALLOW Anywhere 21/tcp ALLOW Anywhere 40000:50000/tcp ALLOW Anywhere 990/tcp ALLOW AnywhereĢ0/tcp (v6) ALLOW Anywhere (v6) 21/tcp (v6) ALLOW Anywhere (v6) 40000:50000/tcp (v6) ALLOW Anywhere (v6) 990/tcp (v6) ALLOW Anywhere (v6) 3.

If the firewall is running, you should see Status: active and the firewall rules we just added. To check the status of the firewall, run: sudo ufw status Press y and ENTER if warned about disrupting the SSH connection. Now, enable the firewall if it isn’t already. sudo ufw allow 20/tcp sudo ufw allow 21/tcp sudo ufw allow 40000:50000/tcp sudo ufw allow 990/tcp We’ll also open port 990 for TLS, which we will set up later. Let’s open ports 20 and 21 for FTP, and ports 40000-50000 for passive FTP. If you don’t want to set up a firewall, skip to Step 3. Before enabling ufw firewall, make sure you add a rule for SSH, otherwise you may get locked out of your server if you’re connected remotely. If you haven’t already done so, it is recommended that you enable the ufw firewall for Ubuntu 18.04 / 18.10 / 19.04 / 19.10. └─31602 /usr/sbin/vsftpd /etc/nfĪpr 17 15:23:22 myserver systemd: Starting vsftpd FTP server.Īpr 17 15:23:22 myserver systemd: Started vsftpd FTP server.Ībove we can see our FTP server is now up and running. Loaded: loaded (/lib/systemd/system/rvice enabled vendor preset: enabledĪctive: active (running) since Tue 15:23:22 UTC 10s ago Once installed, check the status of vsftpd sudo service vsftpd status sudo apt update & sudo apt install vsftpd Press y and ENTER when asked to continue. The first command will update the package lists to ensure you get the latest version and dependencies for vsftpd. The second command will then download and install vsftpd. Let’s begin by updating the package lists and installing vsftpd on Ubuntu 18.04 / 18.10 / 19.04 / 19.10.īelow we have two commands separated by &.
