http://twincreations.co.uk/change-default-ftp-port-for-vsftp/

http://www.cnblogs.com/kuliuheng/p/3209674.html

http://www.cnblogs.com/kuliuheng/p/3209744.html

In a bid to secure our server for a production environment, we need to secure FTP as a vital step. FTP is one of the least secure and most exploited standard protocols on production servers today. Many hosting providers now take additional steps to secure FTP for this very reason.

I’m using VSFTP (Very Secure FTP). Let’s change the default FTP port in a bid to improve our server security. We need to edit the/etc/vsftpd/vsftpd.conf file.

 
 
1
$ vi /etc/vsftpd/vsftpd.conf

First, we disable the connect_from_port option and specify a new data port (typically one port number lower than our connection port):

 
 
1
2
3
4
# set this to NO...
connect_from_port_20=NO
# define new data port (one number lower than connection port)
ftp_data_port=1233

Now we add or edit the following lines to change the port:

 
 
1
2
# non-standard FTP port
listen_port=1234

Don’t be tempted to use 2121! I’m sure that was hard to come up with, but these crackers are smart folks  Also, I would recommend you use a port higher than 1024 and make sure it is not in use by something else.

Once you have edited the file, save and close it and restart the service for changes to take effect:

 
 
1
2
3
/etc/init.d/vsftpd restart
// OR
service vsftpd restart

Done! We changed the port and greatly upped our server security in the process. Don’t forget to change firewall rules for your new port, and secure port 21.

CHANGE DEFAULT FTP PORT FOR VSFTP的更多相关文章

  1. XE: Changing the default http port

    Oracle XE uses the embedded http listener that comes with the XML DB (XDB) to serve http requests. T ...

  2. JDK Environment Variable And Change default JDK

    Environment Variable : change(import) /etc/bashrc export JAVA_HOME=/software/jdk1.8.0 export PATH=$J ...

  3. How to Change Default Web ADI Upload Parameters for FlexField Import / Validation

    How to Change Default Web ADI Upload Parameters for FlexField Import / Validation (文档 ID 553345.1) 转 ...

  4. Change default network name (ens33) to old “eth0” on Ubuntu 18.04 / Ubuntu 16.04

    Change default network name (ens33) to old “eth0” on Ubuntu 18.04 / Ubuntu 16.04 By Raj Last updated ...

  5. [转]how can I change default errormessage for invalid price

    本文转自:http://forums.asp.net/t/1598262.aspx?how+can+I+change+default+errormessage+for+invalid+price I ...

  6. windows 10 change default program bug

    windows 10 change default program bug https://www.isumsoft.com/windows-10/how-to-change-or-set-defau ...

  7. Why was 80 Chosen as the Default HTTP Port and 443 as the Default HTTPS Port?

    https://www.howtogeek.com/233383/why-was-80-chosen-as-the-default-http-port-and-443-as-the-default-h ...

  8. linux 安装SSH Server + FTP Server(openssh-server + vsftp)

    openssh-server (推荐. 一般ssh,ftp 都是单独的,但是这个包含2个) 默认ubuntu 已经安装了, ssh client ,ftp client dpkg -l | grep ...

  9. FTP基础知识 FTP port(主动模式) pasv(被动模式) 及如何映射FTP

    您是否正准备搭建自己的FTP网站?您知道FTP协议的工作机制吗?您知道什么是PORT方式?什么是PASV方式吗?如果您不知道,或没有完全掌握,请您坐下来,花一点点时间,细心读完这篇文章.所谓磨刀不误砍 ...

随机推荐

  1. [Laravel]配置路由小记

    Laravel:4.2 使用的后台是:laravel-backend php artisan routes 使用这个代码,可以看到显示目前项目的路由器 ,我需要添加功能,我就需要添加路由 /* |-- ...

  2. iOS 9 适配需要注意的问题

    iOS 9 适配需要注意的问题 1`网络适配_改用更安全的HTTPS iOS9把所有的http请求都改为https了:iOS9系统发送的网络请求将统一使用TLS 1.2 SSL.采用TLS 1.2 协 ...

  3. 【html】【8】div布局[子div在父div居底]

    从今天起 开始细话div布局   思路及要点: 父div的位置设置成相对的,即“position: relative;”. 而子div的位置设置成绝对的,并且下边缘设为0,即“position: ab ...

  4. OC1_数组创建

    // // main.m // OC1_数组创建 // // Created by zhangxueming on 15/6/11. // Copyright (c) 2015年 zhangxuemi ...

  5. (poj)1064 Cable master 二分+精度

    题目链接:http://poj.org/problem?id=1064 Description Inhabitants of the Wonderland have decided to hold a ...

  6. error C2664 转换错误汇总[转]

    vs2005提示 error C2664: “CWnd::MessageBoxW”: 不能将参数 1 从“const char [17]”转换为“LPCTSTR”. 在用vs2005编写mfc程序的时 ...

  7. Word 2010巧妙绘制各种分割线的方法(图文)

    引用: 使用Word编辑文档时,可能为了使某些内容醒目显示,或者为了使文档内容显示的更美观.更有层次感,需要为文档添加一些分割线,如添加下框线.插入水平线.使用特殊符号快速绘制分割线等等.在Word ...

  8. svn 提交 commit慢

    又修改了一下,上一个方法有问题 #!/bin/bash    ###ubuntu下注意要用bash哦,不然for循环总提示'bad loop....' export LC_CTYPE=en_US.UT ...

  9. 用EPPlus导入导出数据到excel

    项目上中要用到将数据库中所有表导出为Excel,以及将Excel数据导入数据库中的操作,使用EPPlus组件,编写以下两个函数. using OfficeOpenXml;using OfficeOpe ...

  10. Class.forName、Class.class(属性)、getClass()的区别

    1.出现的时期不同:Class.forName()在运行时加载:Class.class和getClass()是在编译器加载2.Class.class只是在编译时用来存放类的相关信息,并没有实例化对象: ...