|
|
(69 revisões intermediárias por 2 usuários não estão sendo mostradas) |
Linha 1: |
Linha 1: |
− | =Configuração no Mikrotik - Cache Full Simples=
| |
| | | |
− | O Cache Full Simples, possibilita determinar uma velocidade para cada cliente.
| + | =Acesso Externo WEB= |
| | | |
− | | + | ==IP > Firewall > Nat== |
− | ==IP > Firewall > Mangle== | |
− | | |
− | No mangle vamos configurar '''quatro regras''', '''três marcações de conexões''' e '''uma marcação de pacote'''.
| |
− | | |
− | '''Para adicionar clique no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]])
| |
− | | |
− | *'''Aba General >'''
| |
− | **'''Chain: '''postrouting
| |
− | | |
− | *'''Aba Advanced >'''
| |
− | **'''DSCP (TOS):''' 10
| |
− | | |
− | *'''Aba Action >'''
| |
− | **'''Action: '''mark connection
| |
− | **'''New Connection Mark:''' HitSpeedr
| |
− | **'''Passthrough: '''Yes
| |
− | | |
− | <div class="img-responsive align-center">[[Arquivo:MikrotikIpFirewallMangleCFS1.png|link=]]</div>
| |
− | | |
− | '''Clique novamente no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]])
| |
− | | |
− | *'''Aba General >'''
| |
− | **'''Chain:''' postrouting
| |
− | | |
− | *'''Aba Advanced >'''
| |
− | **'''DSCP (TOS): '''12
| |
− | | |
− | *'''Aba Action >'''
| |
− | **'''Action:''' mark connection
| |
− | **'''New Connection Mark:''' HitSpeedr
| |
− | **'''Passthrough: '''Yes
| |
− | | |
− | <div class="img-responsive align-center">[[Arquivo:MikrotikIpFirewallMangleCFS2.png|link=]]</div>
| |
− | | |
− | '''Clique novamente no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]])
| |
− | | |
− | *'''Aba General >'''
| |
− | **'''Chain:''' postrouting
| |
− | | |
− | *'''Aba Advanced >'''
| |
− | **'''DSCP (TOS): '''48
| |
− | | |
− | *'''Aba Action >'''
| |
− | **'''Action: '''mark connection
| |
− | **'''New Connection Mark: '''HitSpeedr
| |
− | **'''Passthrough: '''Yes
| |
− | | |
− | <div class="img-responsive align-center">[[Arquivo:MikrotikIpFirewallMangleCFS3.png|link=]]</div>
| |
− | | |
− | '''Clique novamente no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]])
| |
− | | |
− | *'''Aba General >'''
| |
− | **'''Chain: '''postrouting
| |
− | **'''Connection Mark: '''HitSpeedr
| |
− | | |
− | *'''Aba Action >'''
| |
− | **'''Action:''' mark packet
| |
− | **'''New Packet Mark: '''CacheFull
| |
− | **'''Passthrough:''' No
| |
− | | |
− | <div class="img-responsive align-center">[[Arquivo:MikrotikIpFirewallMangleCFS4.png|link=]]</div>
| |
− | | |
− | *Ao término das configurações clique em OK.
| |
− | | |
− | '''Regras:'''
| |
− | /ip firewall mangle
| |
− | add action=mark-connection chain=postrouting dscp=10 new-connection-mark=HitSpeedr
| |
− | add action=mark-connection chain=postrouting dscp=12 new-connection-mark=HitSpeedr
| |
− | add action=mark-connection chain=postrouting dscp=48 new-connection-mark=HitSpeedr
| |
− | add action=mark-packet chain=postrouting connection-mark=HitSpeedr new-packet-mark=\
| |
− | CacheFull passthrough=no
| |
− | | |
− | | |
− | ==Queue > Queue Types==
| |
− | | |
− | Aqui será configurar uma '''Queue em PCQ''', pois ela será responsável por entregar a banda determinada a cada cliente.
| |
− | | |
− | '''Para adicionar clique no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]])
| |
− | | |
− | *'''Type Name:''' CacheFull
| |
− | *'''Kind:''' pcq
| |
− | *'''Rate:''' 5m (velocidade desejada por cliente)
| |
− | | |
− | <div class="img-responsive align-center">[[Arquivo:MikrotikQueueQueueTypesCFS1.png|link=]]</div>
| |
− | | |
− | *Ao término das configurações clique em OK.
| |
− | | |
− | '''Regras:'''
| |
− | /queue type
| |
− | add kind=pcq pcq-classifier=dst-address name=CacheFull pcq-rate=5M
| |
− | | |
− | | |
− | ==Queue > Simple Queues==
| |
− | | |
− | Atenção nessa Queue, ela deverá ser a sua '''primeira regra''', pois caso ela esteja '''abaixo''' das demais Queue, o '''Cache Full poderá não funcionar corretamente'''.
| |
| | | |
| '''Para adicionar clique no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]]) | | '''Para adicionar clique no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]]) |
| | | |
| *'''Aba General >''' | | *'''Aba General >''' |
− | **'''Name: '''Cache Full | + | **'''Chain: '''dstnat |
− | **'''Target:''' 0.0.0.0/0 | + | **'''Protocol: '''tcp |
− | | + | **'''Dst. Port: '''8080 |
− | *'''Aba Advanced >'''
| + | **'''In. Interface: '''ether1 (Interface de Entrada de LINK) |
− | **'''Packet Marks:''' CacheFull (aqui utilizamos a marcação do pacote feita na quarta regra do mangle) | |
− | **'''Queue Type:''' CacheFull (aqui vamos utilizar a Queue Type criada anteriomente) | |
− | | |
− | <div class="img-responsive align-center">[[Arquivo:MikrotikQueueSimpleQueueCFS1.png|link=]]</div>
| |
− | | |
− | *Ao término das configurações clique em OK.
| |
− | | |
− | '''Regras:'''
| |
− | /queue simple
| |
− | add name=CacheFull packet-marks=CacheFull queue=CacheFull/CacheFull target=""
| |
− | | |
− | | |
− | =Configuração no Mikrotik - Cache Full Personalizado=
| |
− | | |
− | O Cache Full Personalizado, possibilita determinar uma velocidade diferente para cada plano oferecido.
| |
− | | |
− | ==PPP > Profiles==
| |
− | | |
− | '''Atenção: ''' Se já utiliza algum sistema de gerenciamento que crie as Address List dinamicamente, pule essa parte.
| |
− | | |
− | Em PPP vamos determinar que o Mikrotik gere automaticamente as Listas de Endereços IP, no exemplo abaixo vamos configurar três Address List, '''uma para cada plano''', caso necessite de mais, basta seguir o modelo ex: '''Address List: Profile4MB'''.
| |
− | | |
− | | |
− | Abra o profile '''1Mega'''
| |
− | | |
− | *'''Aba General >'''
| |
− | **'''Address List: '''Profile1MB
| |
− | | |
− | | |
− | Abra o profile '''2Mega'''
| |
− | | |
− | *'''Aba General >'''
| |
− | **'''Address List: '''Profile2MB
| |
− | | |
| | | |
− | Abra o profile '''3Mega'''
| + | <div class="img-responsive align-center">[[Arquivo:MikrotikIpFirewallNatAccExt1.png|link=]]</div> |
| | | |
− | *'''Aba General >'''
| |
− | **'''Address List: '''Profile3MB
| |
| | | |
− | <div class="img-responsive align-center">[[Arquivo:MikrotikPPP-ProfilesCFP1.png|link=]]</div>
| + | *'''Aba Action>''' |
| + | **'''Action: '''dst-nat |
| + | **'''To Address: '''10.10.150.2 (IP do Speedr) |
| + | **'''To Ports: '''8080 |
| | | |
− | *Ao término das configurações clique em OK.
| + | <div class="img-responsive align-center">[[Arquivo:MikrotikIpFirewallNatAccExt2.PNG|link=]]</div> |
| | | |
− | '''Regras:'''
| |
− | /ppp profile
| |
− | add address-list=Profile1MB name=1Mega rate-limit=128k/1m
| |
− | add address-list=Profile2MB name=2Mega rate-limit=256k/2m
| |
− | add address-list=Profile3MB name=3Mega rate-limit=384k/3m
| |
| | | |
| + | '''Regras''' |
| + | /ip firewall nat |
| + | add action=dst-nat chain=dstnat comment="SPEEDR - EXTERNO WEB" dst-port=8080 in-interface=\ |
| + | ether1 protocol=tcp to-addresses=10.10.150.2 to-ports=8080 |
| | | |
− | ==IP > Firewall > Mangle== | + | =Acesso Externo SSH= |
| | | |
− | Vamos utilizar seis regras no mangle, '''três marcações de conexões''' e '''três marcações de pacotes''', um pacote para cada plano disponível, caso tenha mais planos, basta adicionar mais marcações de pacotes.
| + | ==IP > Firewall > Nat== |
| | | |
| '''Para adicionar clique no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]]) | | '''Para adicionar clique no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]]) |
| | | |
| *'''Aba General >''' | | *'''Aba General >''' |
− | **'''Chain: '''postrouting | + | **'''Chain: '''dstnat |
− | | + | **'''Protocol: '''tcp |
− | *'''Aba Advanced >'''
| + | **'''Dst. Port: '''2229 |
− | **'''DSCP (TOS):''' 10
| + | **'''In. Interface: '''ether1 (Interface de Entrada de LINK) |
− | | |
− | *'''Aba Action >'''
| |
− | **'''Action: '''mark connection
| |
− | **'''New Connection Mark:''' HitSpeedr
| |
− | **'''Passthrough: '''Yes
| |
− | | |
− | <div class="img-responsive align-center">[[Arquivo:MikrotikIpFirewallMangleCFS1.png|link=]]</div>
| |
− | | |
− | '''Clique novamente no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]])
| |
− | | |
− | *'''Aba General >'''
| |
− | **'''Chain:''' postrouting
| |
− | | |
− | *'''Aba Advanced >'''
| |
− | **'''DSCP (TOS): '''12
| |
− | | |
− | *'''Aba Action >'''
| |
− | **'''Action:''' mark connection
| |
− | **'''New Connection Mark:''' HitSpeedr
| |
− | **'''Passthrough: '''Yes
| |
− | | |
− | <div class="img-responsive align-center">[[Arquivo:MikrotikIpFirewallMangleCFS2.png|link=]]</div>
| |
− | | |
− | '''Clique novamente no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]])
| |
− | | |
− | *'''Aba General >'''
| |
− | **'''Chain:''' postrouting
| |
− | | |
− | *'''Aba Advanced >'''
| |
− | **'''DSCP (TOS): '''48
| |
− | | |
− | *'''Aba Action >'''
| |
− | **'''Action: '''mark connection
| |
− | **'''New Connection Mark: '''HitSpeedr
| |
− | **'''Passthrough: '''Yes
| |
− | | |
− | <div class="img-responsive align-center">[[Arquivo:MikrotikIpFirewallMangleCFS3.png|link=]]</div>
| |
− | | |
− | '''Clique novamente no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]])
| |
− | | |
− | *'''Aba General >'''
| |
− | **'''Chain: '''postrouting
| |
− | **'''Connection Mark:''' HitSpeedr
| |
− | | |
− | *'''Aba Advanced >'''
| |
− | **'''Src. Address List: '''Profile1MB
| |
− | | |
− | *'''Aba Action >'''
| |
− | **'''Action:''' mark packet
| |
− | **'''New Packet Mark:''' CacheFullProfile1MB
| |
− | **'''Passthrough: '''No
| |
− | | |
− | <div class="img-responsive align-center">[[Arquivo:MikrotikIpFirewallMangleCFP1.png|link=]]</div>
| |
− | | |
− | '''Clique novamente no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]])
| |
− | | |
− | *'''Aba General >'''
| |
− | **'''Chain: '''postrouting
| |
− | **'''Connection Mark:''' HitSpeedr
| |
− | | |
− | *'''Aba Advanced >'''
| |
− | **'''Src. Address List: '''Profile2MB
| |
− | | |
− | *'''Aba Action >'''
| |
− | **'''Action:''' mark packet
| |
− | **'''New Packet Mark:''' CacheFullProfile2MB
| |
− | **'''Passthrough: '''No
| |
− | | |
− | <div class="img-responsive align-center">[[Arquivo:MikrotikIpFirewallMangleCFP2.png|link=]]</div>
| |
− | | |
− | '''Clique novamente no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]])
| |
− | | |
− | *'''Aba General >'''
| |
− | **'''Chain: '''postrouting
| |
− | **'''Connection Mark:''' HitSpeedr
| |
− | | |
− | *'''Aba Advanced >'''
| |
− | **'''Src. Address List: '''Profile3MB
| |
− | | |
− | *'''Aba Action >'''
| |
− | **'''Action:''' mark packet
| |
− | **'''New Packet Mark:''' CacheFullProfile3MB
| |
− | **'''Passthrough: '''No
| |
− | | |
− | <div class="img-responsive align-center">[[Arquivo:MikrotikIpFirewallMangleCFP3.png|link=]]</div>
| |
− | | |
− | *Ao término das configurações clique em OK.
| |
− | | |
− | '''Regras:'''
| |
− | /ip firewall mangle
| |
− | add action=mark-connection chain=postrouting dscp=10 new-connection-mark=HitSpeedr
| |
− | add action=mark-connection chain=postrouting dscp=12 new-connection-mark=HitSpeedr
| |
− | add action=mark-connection chain=postrouting dscp=48 new-connection-mark=HitSpeedr
| |
− | add action=mark-packet chain=postrouting connection-mark=HitSpeedr new-packet-mark=\
| |
− | CacheFull passthrough=no
| |
− | add action=mark-packet chain=postrouting connection-mark=HitSpeedr new-packet-mark=\
| |
− | CacheFullProfile1MB passthrough=no
| |
− | add action=mark-packet chain=postrouting connection-mark=HitSpeedr new-packet-mark=\
| |
− | CacheFullProfile2MB passthrough=no
| |
− | add action=mark-packet chain=postrouting connection-mark=HitSpeedr new-packet-mark=\
| |
− | CacheFullProfile3MB passthrough=no
| |
− | | |
− | | |
− | ==Queue > Queue Types==
| |
− | | |
− | Diferente da configuração simples, no personalizado vamos criar uma '''Queue Type''' para '''cada plano'''.
| |
− | | |
− | '''Para adicionar clique no botão: '''([[Arquivo:MikrotikBotaoAdd.png|link=]])
| |
− | | |
− | *'''Type Name:''' CacheFullProfile1MB
| |
− | *'''Kind:''' pcq
| |
− | *'''Rate: '''2m (velocidade desejada por cliente)
| |
− | | |
− | | |
− | '''Clique novamente no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]])
| |
− | | |
− | *'''Type Name:''' CacheFullProfile2MB
| |
− | *'''Kind: '''pcq
| |
− | *'''Rate: '''4m (velocidade desejada por cliente)
| |
− | | |
− | | |
− | '''Clique novamente no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]])
| |
− | | |
− | *'''Type Name:''' CacheFullProfile3MB
| |
− | *'''Kind: '''pcq
| |
− | *'''Rate: '''6m (velocidade desejada por cliente)
| |
− | | |
− | <div class="img-responsive align-center">[[Arquivo:MikrotikQueueQueueTypesCFP1.png|link=]]</div>
| |
− | | |
− | *Ao término das configurações clique em OK.
| |
− | | |
− | '''Regras:'''
| |
− | /queue type
| |
− | add kind=pcq name=CacheFullProfile1MB pcq-classifier=dst-address pcq-rate=2M
| |
− | add kind=pcq name=CacheFullProfile2MB pcq-classifier=dst-address pcq-rate=4M
| |
− | add kind=pcq name=CacheFullProfile3MB pcq-classifier=dst-address pcq-rate=6M
| |
− | | |
− | | |
− | ==Queue > Simple Queues==
| |
− | | |
− | Seguindo o raciocínio da Queue Type, aqui também será criada uma regra para cada plano.
| |
− | | |
− | '''Para adicionar clique no botão: '''([[Arquivo:MikrotikBotaoAdd.png|link=]])
| |
− | | |
− | *'''Aba General >'''
| |
− | **'''Name: '''Cache Full 1Mega
| |
− | **'''Target:''' 0.0.0.0/0
| |
− | | |
− | *'''Aba Advanced >'''
| |
− | **'''Packet Marks:''' CacheFullProfile1MB
| |
− | **'''Queue Type: '''CacheFullProfile1MB
| |
− | | |
− | <div class="img-responsive align-center">[[Arquivo:MikrotikQueueSimpleQueueCFP1.png|link=]]</div>
| |
− | | |
− | '''Clique novamente no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]])
| |
− | | |
− | *'''Aba General >'''
| |
− | **'''Name: '''Cache Full 2Mega | |
− | **'''Target:''' 0.0.0.0/0 | |
− | | |
− | *'''Aba Advanced >'''
| |
− | **'''Packet Marks:''' CacheFullProfile2MB
| |
− | **'''Queue Type:''' CacheFullProfile2MB | |
− | | |
− | <div class="img-responsive align-center">[[Arquivo:MikrotikQueueSimpleQueueCFP2.png|link=]]</div>
| |
− | | |
− | '''Clique novamente no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]])
| |
− | | |
− | *'''Aba General >'''
| |
− | **'''Name: '''Cache Full 3Mega
| |
− | **'''Target: '''0.0.0.0/0
| |
− | | |
− | *'''Aba Advanced >'''
| |
− | **'''Packet Marks: '''CacheFullProfile3MB
| |
− | **'''Queue Type: '''CacheFullProfile3MB
| |
− | | |
− | <div class="img-responsive align-center">[[Arquivo:MikrotikQueueSimpleQueueCFP3.png|link=]]</div>
| |
− | | |
− | *Ao término das configurações clique em OK.
| |
| | | |
− | '''Regras:'''
| + | <div class="img-responsive align-center">[[Arquivo:MikrotikIpFirewallNatAccExt3.png|link=]]</div> |
− | /queue simple
| |
− | add name=CacheFullProfile1MB packet-marks=CacheFullProfile1MB queue=\
| |
− | CacheFullProfile1MB/CacheFullProfile1MB target=""
| |
− | add name=CacheFullProfile2MB packet-marks=CacheFullProfile2MB queue=\
| |
− | CacheFullProfile2MB/CacheFullProfile2MB target=""
| |
− | add name=CacheFullProfile3MB packet-marks=CacheFullProfile3MB queue=\
| |
− | CacheFullProfile3MB/CacheFullProfile3MB target=""
| |
− | move CacheFullProfile1MB 0
| |
− | move CacheFullProfile2MB 1
| |
− | move CacheFullProfile3MB 2
| |
| | | |
| | | |
− | =Configurações no Speedr=
| + | *'''Aba Action>''' |
| + | **'''Action: '''dst-nat |
| + | **'''To Address: '''10.10.150.2 (IP do Speedr) |
| + | **'''To Ports: '''2229 |
| | | |
− | Abra o App QoS L7
| + | <div class="img-responsive align-center">[[Arquivo:MikrotikIpFirewallNatAccExt4.png|link=]]</div> |
| | | |
− | Clique em SPEEDTEST
| |
| | | |
− | Em DCSP Hit: Marque o TOS 192
| + | '''Regras''' |
| + | /ip firewall nat |
| + | add action=dst-nat chain=dstnat comment="SPEEDR - EXTERNO SSH" dst-port=2229 in-interface=\ |
| + | ether1 protocol=tcp to-addresses=10.10.150.2 to-ports=2229 |
| | | |
− | Clique em Salvar
| + | __NOEDITSECTION__ |
| + | [[Category:Teste]] |