V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
fengchen0vr
V2EX  ›  Linux

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

  •  
  •   fengchen0vr · 2022-01-20 17:39:55 +08:00 · 1677 次点击
    这是一个创建于 798 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

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

    从你需求来看,建议根据 url path 做 upstream 分流
    fengchen0vr
        4
    fengchen0vr  
    OP
       2022-04-07 09:52:05 +08:00
    vsftpd 防火墙限制数据端口连接数
    sudo iptables -I INPUT -p tcp --syn --dport 60000:60099 -m connlimit --connlimit-above 2 -j DROP
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1639 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 16:50 · PVG 00:50 · LAX 09:50 · JFK 12:50
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.