FTP connection to NAT VPS with VSFTPD


Natvps.id – Although the majority of VPS (including NAT VPS) provides SFTP -based SFTP connections to transfer files to the server, but there are times when we need to use the FTP connection. For that, we can use software like VSFTPD As a FTP server that we can install on NAT VPS.

This article explains how to install VSFTPD and configuration passive mode and the port. This article uses Ubuntu 22.04 as a reference. For other OS, please adjust the steps listed.

Port forwarding configuration

Considering we use grout, we need to add Minimum 2 Port Forwarding Configuration In the virtualizor panel (or other VPS panels according to the provider). This port will be used for Listen to the port And passive mode on VSFTPD.

For example, in this article will use a port 32503 And 32504. You are free to change this port according to your choice. Record this port, because we will use it again in the configuration process.

Install & Configuration VSFTPD

First, install VSFTPD Using Orders:

apt update && apt install vsftpd -y

Then, edit the VSFTPD file using the command:

vim /etc/vsftpd.conf

Change Port VSFTPD

Find the following lines:

# Run standalone?  vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
listen=NO

Change NO become YES.

Underneath, add the following lines:

listen_port=32503

Change 32503 With the port you have chosen before.

Turn off Anonymous Access

Find the following lines:

# Allow anonymous FTP? (Disabled by default).
anonymous_enable=NO

Then change anonymous_enable=NO To yes:

Allow write access

Find the following lines:

# Uncomment this to enable any form of FTP write command.
#write_enable=YES

Delete the fence sign in front #write_enable=YESlike this:

Activate Passive Mode

In the last line, add the following code:

# Passive Mode
pasv_enable=YES
pasv_min_port=32504
pasv_max_port=32504

Save the file.

Allowing the Root User to Login FTP

In default, VSFTPD blocks login access using the user rootFor the sake of server security. However, because we use root As default users, we can allow it to log in FTP.

WARNING! Login using Root is known to be dangerous, because all that login can access the entire contents of your server. If you don’t want to use root access to login, you can create a user other than root. Please read: Make a User Sudo on Ubuntu 20.04.

Book Give /etc/ftpusersThen give a fence (#) on rootas follows:

Restart VFSTPD

Enter rule The following is to activate the new VSFTPD configuration:

systemctl restart vsftpd

Connect to FTP

Now, NAT VPS can be connected via FTP for file transfer.

For example, if you use Filezillathen enter the following configuration:

  • Host: Public IP NAT VPS
  • Last name: Server User Name (Root)
  • Password: Password to login VPS as usual
  • Harbor: Port for VSFTPD (for example: 32503)

Happy! The VSFTPD installation is complete and can be used for file transfer.

Cover

Thus this article regarding the steps to install VSFTPD on NAT VPS. If you are confused or doubtful, don’t hesitate to ask questions in the telegram group @ipv6indonesia. Thank You!



Game Center

Game News

Review Film
Rumus Matematika
Anime Batch
Berita Terkini
Berita Terkini
Berita Terkini
Berita Terkini
review anime

Gaming Center