+ Responder ao Tópico



  1. #1

    Padrão Limitar numero de downloads simultaneos por clieente e extenção.

    A ideia aqui é limitar o numero de downloads simultâneos por cliente por determinadas extenções pra quem tem pouca banda.

    ip firewall mangle>

    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.mp3
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.zip
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.rar
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.rar
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.flv
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.mp4
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.exe
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.iso
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.nrg
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.avi
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.3gp
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.mov
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.mpeg
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.mpg
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.wav
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.aac

    ip firewall filter
    add chain=forward action=drop protocol=tcp src-address-list=192.168.x.0/24 connection-mark=LIMITADOS connection-limit=2,32

  2. #2

    Padrão Re: Limitar numero de downloads simultaneos por clieente e extenção.

    boa tarde amigo
    te adicionei la no skype, queria ver com você um QOS
    obrigado

  3. #3

    Padrão Re: Limitar numero de downloads simultaneos por clieente e extenção.

    Citação Postado originalmente por int21 Ver Post
    A ideia aqui é limitar o numero de downloads simultâneos por cliente por determinadas extenções pra quem tem pouca banda.

    ip firewall mangle>

    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.mp3
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.zip
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.rar
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.rar
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.flv
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.mp4
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.exe
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.iso
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.nrg
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.avi
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.3gp
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.mov
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.mpeg
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.mpg
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.wav
    add chain=forward action=mark-connection new-connection-mark=LIMITADOS passthrough=yes in-interface=lan content=.aac

    ip firewall filter
    add chain=forward action=drop protocol=tcp src-address-list=192.168.x.0/24 connection-mark=LIMITADOS connection-limit=2,32
    Olá Celso, parabéns pela ótima iniciativa, vai ser de grande ajuda p/ todos aqui do fórum.

    Tenho duas perguntas: Minha rede é em bridge (tenho Vlan's bem simples entre minha base principal e as repetidoras). O limite imposto pela regra no filter é referente ao numero de downloads ou tamanho dos arquivos que serão baixados ?

    Outra pergunta é sobre a bridge, pois vi que no mangle é setado a in-interface=lan. Como seria no meu caso, por causa da bridge e as Vlan's ?

    Abraço.

  4. #4

    Padrão Re: Limitar numero de downloads simultaneos por clieente e extenção.

    Opa, como a regra diz 192.168.x.0/24 connection-mark=LIMITADOS connection-limit=2,32 ou seja:

    192.168.x.0/24 seria o bloco de sua rede (mude de acordo a sua realidade)
    connection-limit=2,32 seria o tratamento do download.

    Em termos praticos seria:

    o cliente 200 esta baixando 1 arquivo .exe

    192.168.1.200 <----------------> 192.168.1.1
    cliente servidor


    Com isso pode-se alterar o numero para a sua vontade e usar o mesmo principio para outras implementacoes.