Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
fengchen0vr
V2EX  ›  Linux

vsftpd 怎么设置每个 ip 限制一个命令连接加一个数据连接

  •  
  •   fengchen0vr · Jan 20, 2022 · 2345 views
    This topic created in 1608 days ago, the information mentioned may be changed or developed.

    现在是设置了 vsftpd.conf 中 max_per_ip=2 ,但这两个连接有时都被数据连接占用了

    还有 nginx 也同理,下载连接怎么不占用刷网页的连接

    4 replies    2022-04-07 09:52:05 +08:00
    liuxu
        1
    liuxu  
       Jan 20, 2022
    iptables 限制
    nginx 限制下载带宽
    fengchen0vr
        2
    fengchen0vr  
    OP
       Jan 21, 2022
    @liuxu 感谢回复,vsftpd 可以用端口限制连接数,
    nginx 还是想把刷网页和下载文件各一个连接
    liuxu
        3
    liuxu  
       Jan 21, 2022
    @fengchen0vr nginx 限制连接有点困难,特别是现在是 http2 的时代

    从你需求来看,建议根据 url path 做 upstream 分流
    fengchen0vr
        4
    fengchen0vr  
    OP
       Apr 7, 2022
    vsftpd 防火墙限制数据端口连接数
    sudo iptables -I INPUT -p tcp --syn --dport 60000:60099 -m connlimit --connlimit-above 2 -j DROP
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4924 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 120ms · UTC 01:09 · PVG 09:09 · LAX 18:09 · JFK 21:09
    ♥ Do have faith in what you're doing.