X
    Categories: Linux

How to secure ftp port.

secure ftp port:

Making the secure ftp port is more important as you already know that vsftpd use default port 21 for making the connection with the server. So anybody (hacker) can try with the same port for connecting to server. But what if he/she doesn’t know the port for vsftpd for connection, yes off course then he/she has to do lot off effort for identifying the port number for connection. Yes there is way to make secure ftp port.

So here we go for practical way to secure ftp port from hacker.

Step 1: Edit the /etc/vsftpd/ vsftpd.conf file using vi editor to change the  secure ftp port using “listen_port” entry.

vi /etc/vsftpd/vsftpd.conf
 Add/modify below entry:
 listen_port=201

Step 2. Once you changed the secure ftp port restart the service.

 

[root@kalwa1 vsftpd]# service vsftpd restart
 Shutting down vsftpd:                                      [  OK  ]
 Starting vsftpd for vsftpd:                                [  OK  ]
 [root@kalwa1 vsftpd]#

Now to connect with ftp server you need to use secure ftp port 201 instead of default one.

 

# ftp 192.168.216.130
ftp: connect: Connection refused
ftp> bye

 

Now if you use secure ftp port which is 201. system responds with

 

[root@kalwa1 vsftpd]# ftp 192.168.216.130 201
Connected to 192.168.216.130 (192.168.216.130).
220 (vsFTPd 2.2.2)
Name (192.168.216.130:root): root
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
ftp>
ftp>
ftp> bye
221 Goodbye.
[root@kalwa1 vsftpd]#

 

Related Post