当前位置:网站首页>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
边栏推荐
- NLP four paradigms: paradigm 1: fully supervised learning in the era of non neural networks (Feature Engineering); Paradigm 2: fully supervised learning based on neural network (Architecture Engineeri
- [combinatorics] recursive equation (example 1 of recursive equation | list recursive equation)
- 免费数据 | 新库上线 | CnOpenData中国保险中介机构网点全集数据
- Pools de Threads: les composants les plus courants et les plus sujets aux erreurs du Code d'affaires
- Redis:关于列表List类型数据的操作命令
- New features of C 10
- [combinatorics] recursive equation (outline of recursive equation content | definition of recursive equation | example description of recursive equation | Fibonacci Series)
- 29:第三章:开发通行证服务:12:开发【获得用户账户信息,接口】;(使用VO类包装查到的数据,以符合接口对返回数据的要求)(在多处都会用到的逻辑,在Controller中可以把其抽成一个共用方法)
- CC2530 common registers for crystal oscillator settings
- 深入理解 SQL 中的 Grouping Sets 语句
猜你喜欢

Atom QT 16_ audiorecorder

Mysql database -dql

C语言按行修改文件

How do large consumer enterprises make digital transformation?

Arduino esp32: overall framework of lvgl project (I)

One brush 149 force deduction hot question-10 regular expression matching (H)

Why is WPA3 security of enterprise business so important?

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

建立自己的网站(23)

CC2530 common registers for crystal oscillator settings
随机推荐
Pools de Threads: les composants les plus courants et les plus sujets aux erreurs du Code d'affaires
Mysql database DDL and DML
Why is WPA3 security of enterprise business so important?
PHP production website active push (website)
Meituan side: why does thread crash not cause JVM crash
C language string inversion
Kotlin学习快速入门(7)——扩展的妙用
The way of wisdom (unity of knowledge and action)
Leetcode: lucky number in matrix
How to allow remote connection to MySQL server on Linux system?
跨境电商:外贸企业做海外社媒营销的优势
29:第三章:开发通行证服务:12:开发【获得用户账户信息,接口】;(使用VO类包装查到的数据,以符合接口对返回数据的要求)(在多处都会用到的逻辑,在Controller中可以把其抽成一个共用方法)
One brush 145 force deduction hot question-2 sum of two numbers (m)
One brush 144 force deduction hot question-1 sum of two numbers (E)
执行脚本不认\r
New features of C 10
One brush 146 force buckle hot question-3 longest substring without repeated characters (m)
Shentong express expects an annual loss of nearly 1billion
What material is 12cr1movr? Chemical property analysis of pressure vessel steel plate 12cr1movr
How do large consumer enterprises make digital transformation?