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. 微信平台(一)--获取access_token

    事前思路准备 说在前面:如果要获取access_token,那么你需要appid,appsecret;另外需要post请求连接https://api.weixin.qq.com/cgi-bin/tok ...

  2. tlb,tlh,tli文件的关系

    tlb文件:com类型库文件.在需要使用对应com类的模块里,“#import ...*.tlb”使用之. tlh.tli文件:他们是vc++编译器解析tlb文件生成的标准c++文件.因为odl和tl ...

  3. Config spec rules for elements in subbranches

    Quote from:  Config spec rules for elements in subbranches The following is an example of a config s ...

  4. 九度OJ 1104 整除问题

    题目地址:http://ac.jobdu.com/problem.php?pid=1104 题目描述: 给定n,a求最大的k,使n!可以被a^k整除但不能被a^(k+1)整除. 输入: 两个整数n(2 ...

  5. windows phone 网易云阅读hubtile效果实现

    效果图 曾几何时,刚接触wp的时候做了一个类似的界面,不过是Rectangle实现的,还是一个个摆的..囧啊 现在感觉这种应该是用hubtile实现的,Toolkit(http://silverlig ...

  6. 【安装操作系统】VMware 中安装 Redhat 5

    引言 已有一台 Windows XP 家用机,安装 Linux 虚拟机,一不小心就会走弯路,因此本文提供一些入门级的经验来帮助你躲开歧途. 欢迎来到 lovickie 的博客 http://www.c ...

  7. Python3 错误处理 和 测试

    try 让我们用一个例子来看看try的机制: try: print('try...') r = 10 / 0 except ZeroDivisionError as e: print('except: ...

  8. 正确理解javascript的this关键字

    javascript有this关键字,它和javascript的执行上下文有着密切的关系,就是说this具体指代什么要根据它的上下文来判断. 一.this和对象的关系    var Person={ ...

  9. C#基础(五)——类中私有构造函数作用

    如果类成员有private修饰符,就不允许在类范围以外访问这个类成员.对类构造函数应用private修饰符时,则禁止外部类创建该类的实例.尽管看上去有些不好理解(既然不能实例化,那么这个类还有什么用处 ...

  10. SQL Server2008数据库导入导出兼容性处理

    使用场景:SQL Server 的高版本数据库恢复到低版本则可能会有兼容性问题,为了解决此类问题进行数据库脚本模式处理,数据库结构,及数据存储更换版本等. 1.  选择要导出的数据库,右键任务,生成脚 ...