当前位置:网站首页>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
边栏推荐
- 汇编实例解析--实模式下屏幕显示
- Squid service startup script
- Take you to API development by hand
- Preventing/catching “IllegalArgumentException: parameter must be a descendant of this view” error
- 免费数据 | 新库上线 | CnOpenData中国保险中介机构网点全集数据
- Great changes! National housing prices fell below the 10000 yuan mark
- [combinatorics] polynomial theorem (polynomial coefficients | full arrangement of multiple sets | number of schemes corresponding to the ball sub model | polynomial coefficient correlation identity)
- How to delete a specific line from a text file using the SED command?
- What is the material of 13mnnimor? 13mnnimor steel plate for medium and low temperature pressure vessels
- Shentong express expects an annual loss of nearly 1billion
猜你喜欢
What is the material of sa302grc? American standard container plate sa302grc chemical composition
Fast Ethernet and Gigabit Ethernet: what's the difference?
One brush 147-force deduction hot question-4 find the median of two positive arrays (H)
How do large consumer enterprises make digital transformation?
手把手带你入门 API 开发
CC2530 common registers for ADC single channel conversion
静态程序分析(一)—— 大纲思维导图与内容介绍
Kotlin学习快速入门(7)——扩展的妙用
utfwry. Dat PHP, about ThinkPHP's method of IP location using utfwry address Library
The most complete postman interface test tutorial in the whole network, API interface test
随机推荐
RedHat 6.2 配置 Zabbix
One brush 146 force buckle hot question-3 longest substring without repeated characters (m)
Difference between JSON and bson
Recommendation of good books on learning QT programming
New features of C 10
Great changes! National housing prices fell below the 10000 yuan mark
What is the pledge pool and how to pledge?
What kind of material is 14Cr1MoR? Analysis of chemical composition and mechanical properties of 14Cr1MoR
Necessary ability of data analysis
Daily code 300 lines learning notes day 10
智慧之道(知行合一)
MySQL user management
29:第三章:开发通行证服务:12:开发【获得用户账户信息,接口】;(使用VO类包装查到的数据,以符合接口对返回数据的要求)(在多处都会用到的逻辑,在Controller中可以把其抽成一个共用方法)
深入理解 SQL 中的 Grouping Sets 语句
大消费企业怎样做数字化转型?
27. Input 3 integers and output them in descending order. Pointer method is required.
PHP converts a one-dimensional array into a two-dimensional array
Apache服务挂起Asynchronous AcceptEx failed.
Prepare for the golden three silver four, 100+ software test interview questions (function / interface / Automation) interview questions. win victory the moment one raises one 's standard
[Jianzhi offer] 58 - ii Rotate string left