|
|
(66 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 não vai funcionar'''.
| |
| | | |
| '''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="0.0.0.0/0"
| |
− | | |
− | | |
− | =Configuração no Mikrotik - Cache Full Personalizado=
| |
| | | |
− | O Cache Full Personalizado, possibilita determinar uma velocidade diferente para cada plano oferecido.
| + | <div class="img-responsive align-center">[[Arquivo:MikrotikIpFirewallNatAccExt1.png|link=]]</div> |
| | | |
− | ==PPP > Profiles==
| |
| | | |
− | '''Atenção: ''' Se já utiliza algum sistema de gerenciamento que crie as Address List dinamicamente, pule essa parte. | + | *'''Aba Action>''' |
| + | **'''Action: '''dst-nat |
| + | **'''To Address: '''10.10.150.2 (IP do Speedr) |
| + | **'''To Ports: '''8080 |
| | | |
− | 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'''.
| + | <div class="img-responsive align-center">[[Arquivo:MikrotikIpFirewallNatAccExt2.PNG|link=]]</div> |
| | | |
| | | |
− | Abra o profile '''1Mega'''
| + | '''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 |
| | | |
− | *'''Aba General >'''
| + | =Acesso Externo SSH= |
− | **'''Address List: '''Profile1MB
| |
| | | |
− | | + | ==IP > Firewall > Nat== |
− | Abra o profile '''2Mega'''
| |
− | | |
− | *'''Aba General >'''
| |
− | **'''Address List: '''Profile2MB
| |
− | | |
− | | |
− | Abra o profile '''3Mega'''
| |
− | | |
− | *'''Aba General >'''
| |
− | **'''Address List: '''Profile3MB
| |
− | | |
− | <div class="img-responsive align-center">[[Arquivo:MikrotikPPP-ProfilesCFP1.png|link=]]</div>
| |
− | | |
− | *Ao término das configurações clique em OK.
| |
− | | |
− | '''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
| |
− | | |
− | | |
− | ==IP > Firewall > Mangle== | |
− | | |
− | 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.
| |
| | | |
| '''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 |
| + | **'''Dst. Port: '''2229 |
| + | **'''In. Interface: '''ether1 (Interface de Entrada de LINK) |
| | | |
− | *'''Aba Advanced >'''
| + | <div class="img-responsive align-center">[[Arquivo:MikrotikIpFirewallNatAccExt3.png|link=]]</div> |
− | **'''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>
| + | *'''Aba Action>''' |
− | | + | **'''Action: '''dst-nat |
− | '''Clique novamente no botão:''' ([[Arquivo:MikrotikBotaoAdd.png|link=]])
| + | **'''To Address: '''10.10.150.2 (IP do Speedr) |
− | | + | **'''To Ports: '''2229 |
− | *'''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.
| |
− | | |
− | '''Atenção''', todas a regras que serão adicionadas deveram ser as''' primeiras regras''', pois caso fiquem '''abaixo''' das demais Queue, o '''Cache Full não vai funcionar'''.
| |
− | | |
− | '''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 >'''
| + | <div class="img-responsive align-center">[[Arquivo:MikrotikIpFirewallNatAccExt4.png|link=]]</div> |
− | **'''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''' |
| + | /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 |
| | | |
− | '''Regras:'''
| + | __NOEDITSECTION__ |
− | /queue simple
| + | [[Category:Teste]] |
− | add name=CacheFullProfile1MB packet-marks=CacheFullProfile1MB queue=\
| |
− | CacheFullProfile1MB/CacheFullProfile1MB target="0.0.0.0/0"
| |
− | add name=CacheFullProfile2MB packet-marks=CacheFullProfile2MB queue=\
| |
− | CacheFullProfile2MB/CacheFullProfile2MB target="0.0.0.0/0"
| |
− | add name=CacheFullProfile3MB packet-marks=CacheFullProfile3MB queue=\
| |
− | CacheFullProfile3MB/CacheFullProfile3MB target="0.0.0.0/0"
| |