当前位置:网站首页>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
边栏推荐
- Difference between JSON and bson
- C语言按行修改文件
- Squid service startup script
- [try to hack] active detection and concealment technology
- 線程池:業務代碼最常用也最容易犯錯的組件
- 2022.02.14_ Daily question leetcode five hundred and forty
- The most complete postman interface test tutorial in the whole network, API interface test
- PHP online confusion encryption tutorial sharing + basically no solution
- SSH连接远程主机等待时间过长的解决方法
- RF analyze demo build step by step
猜你喜欢

Talk about several methods of interface optimization

What kind of material is 14Cr1MoR? Analysis of chemical composition and mechanical properties of 14Cr1MoR

网络安全web渗透技术

Redis: operation commands for list type data

New features of C 10

Kotlin学习快速入门(7)——扩展的妙用

Analysis of variance summary

UCORE overview

Daily code 300 lines learning notes day 10

大消费企业怎样做数字化转型?
随机推荐
function overloading
[2. Basics of Delphi grammar] 2 Object Pascal data type
27. 输入3个整数,按从大到小的次序输出。要求用指针方法实现。
ucore概述
SVN如何查看修改的文件记录
Squid service startup script
Solution to long waiting time of SSH connection to remote host
Recommendation of good books on learning QT programming
SVN完全备份svnadmin hotcopy
[combinatorics] polynomial theorem (polynomial coefficients | full arrangement of multiple sets | number of schemes corresponding to the ball sub model | polynomial coefficient correlation identity)
mysql用户管理
CC2530 common registers for port initialization
How to judge the region of an IP through C?
27. Input 3 integers and output them in descending order. Pointer method is required.
简单配置PostFix服务器
[combinatorics] recursive equation (constant coefficient linear homogeneous recursive equation | constant coefficient, linear, homogeneous concept description | constant coefficient linear homogeneous
Squid 服务启动脚本
Rsync远程同步
PHP converts a one-dimensional array into a two-dimensional array
CC2530 common registers for port interrupts