当前位置:网站首页>Open vsftpd port under iptables firewall
Open vsftpd port under iptables firewall
2022-07-03 17:04:00 【Brother Xing plays with the clouds】
In the open vsftpd port Later, I found that I can log in with the client tool , But I can't browse files and create new files . At this time, I looked ftp The agreement , Find out ftp There are active mode and passive mode . Open at the service end 21 The port allows the client to enter , There is no exit port , Open the port on the server , Finally, add ftp The corresponding module , The whole operation is a little complicated , Write it down today to deepen your impression in the future .
1. install vsftpd Software
yum install vsftpd -y
2. Open anonymous access and passive mode port
vim /etc/vsftpd/vsftpd.conf
anonymous_enable=YES -- Enable anonymous user access
anon_upload_enable=YES -- Anonymous user names can upload files
anon_mkdir_write_enable=YES -- Anonymous users can create files anon_other_write_enable=YES -- Anonymous users can rename files
pasv_enable=YES -- Turn on passive mode pasv_min_port=30000 -- Passive mode minimum port pasv_max_port=31000 -- Passive mode maximum port
3. load ftp modular
vim /etc/modprobe.d/vsftpd.conf
alias ip_conntrack ip_conntrack_ftp ip_nat_ftp -- load ftp modular
vim /etc/rc.local
/sbin/modprobe ip_conntract -- Boot load module /sbin/modprobe ip_conntrack_ftp /sbin/modprobe ip_nat_ftp
4. Port filtering
vim /etc/sysconfig/iptables
-A INPUT -p tcp -m multiport --dport 20,21 -m state --state NEW -j ACCEPT -- Turn on 20,21 port -A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT -- Turn on 21 Active port -A INPUT -p tcp --dport 30000:31000 -j ACCEPT -- Open the passive port
5. Login test
边栏推荐
- Web crawler knowledge day03
- 执行脚本不认\r
- One brush 146 force buckle hot question-3 longest substring without repeated characters (m)
- [combinatorics] recursive equation (the relationship theorem between the solution of the recursive equation and the characteristic root | the linear property theorem of the solution of the recursive e
- [combinatorics] recursive equation (characteristic equation and characteristic root | example of characteristic equation | root formula of monadic quadratic equation)
- 29:第三章:开发通行证服务:12:开发【获得用户账户信息,接口】;(使用VO类包装查到的数据,以符合接口对返回数据的要求)(在多处都会用到的逻辑,在Controller中可以把其抽成一个共用方法)
- mysql用户管理
- What material is sa537cl2? Analysis of mechanical properties of American standard container plate
- 在iptables防火墙下开启vsftpd的端口
- 手把手带你入门 API 开发
猜你喜欢
![[try to hack] active detection and concealment technology](/img/43/d48f851268fec566ce0cc83bd9557e.png)
[try to hack] active detection and concealment technology

線程池:業務代碼最常用也最容易犯錯的組件

Idea configuration plug-in

Shentong express expects an annual loss of nearly 1billion

What is the material of 13mnnimor? 13mnnimor steel plate for medium and low temperature pressure vessels

跨境电商:外贸企业做海外社媒营销的优势

CC2530 common registers for port interrupts

聊聊接口优化的几个方法

建立自己的网站(23)

Why is WPA3 security of enterprise business so important?
随机推荐
新库上线 | CnOpenData中国保险机构网点全集数据
[mathematical logic] equivalent calculus and reasoning calculus of propositional logic (propositional logic | equivalent calculus | principal conjunctive (disjunctive) paradigm | reasoning calculus)**
Network security web penetration technology
vs code 插件 koroFileHeader
网络硬盘NFS的安装与配置
CC2530 common registers for timer 1
Depth first search of graph
执行脚本不认\r
免费数据 | 新库上线 | CnOpenData中国保险中介机构网点全集数据
SSH连接远程主机等待时间过长的解决方法
【Try to Hack】主动侦查隐藏技术
[combinatorics] recursive equation (example 1 of recursive equation | list recursive equation)
新库上线 | CnOpenData中国观鸟记录数据
PHP converts a one-dimensional array into a two-dimensional array
The most complete postman interface test tutorial in the whole network, API interface test
Javescript variable declaration -- VaR, let, const
MySQL Basics
27. 输入3个整数,按从大到小的次序输出。要求用指针方法实现。
Preventing/catching “IllegalArgumentException: parameter must be a descendant of this view” error
CC2530 common registers for ADC single channel conversion