sexta-feira, 21 de outubro de 2011

Cache full no Mikrotik / Cache full in Mikrotik

Neste tutorial, você vai aprender a configurar um cache full em seu servidor Mikrotik de forma que todos os arquivos e programas baixado na internet pela sua rede interna fique armazenado no seu servidor, assim, quando outro usuário quiser baixar esse mesmo arquivo, ele não irá consumir mais banda, vai pegar esse arquivos direto do seu servidor na velocidade da sua rede interna. Para isso você vai precisa dos seguintes pré-requisitos:
In this tutorial you will learn how to configure a cache full Mikrotik on your server so that all files and programs downloaded from the Internet by your internal network be stored on your server, so when another user wants to download that same file, it will not consume more bandwidth, this will pick up files directly from your server at the speed of your internal network. For this you will need the following prerequisites:
  1. Ter o proxy devidamente configurado em seu servidor. Se ainda não tem, veja como fazer nesse link
  2. Ter um HD grande para poder armazenar todos os downloads.
  1. Having the proxy properly configured on your server. If you have not already, check out howthis link
  2. Having a large hard disk so you can store all downloads.
Vamos começar!
Let's get started!

1. Primeiro vamos realizar as marcações de conexões e pacotes no mangle. Clique em IP depois em FIREWALL
1. First we perform the markings of connections and packets in the mangle. Click IP thenFIREWALL


2. Na aba MANGLE, clique no botão +. Na aba GENERAL, no campo CHAIN selecione a opção OUTPUT. No campo PROTOCOL, selecione a opção TCP. No campo SRC.PORT, coloque a porta de configuração do seu proxy, se você não alterou, então coloque a porta 8080. Agora na aba ADVANCED, no campo DSCP (TOS), coloque 4 (esse é o número do Tipo de Serviço utilizado pelo proxy). Agora clique na aba ACTION, no campo ACTION, selecione a opção MARK CONNECTION. No campo NEW MARK CONNECTION coloque CONN-CACHE-FULL e deixe a opção PASSTHROUGH marcado. Por fim, clique em OK.
2. Mangle tab, click the + button. On the General tab, select the field CHAIN ​​OUTPUT option. In the Protocol field, select TCP. SRC.PORT in the field, put the port configuration of your proxy if you have not changed, then put the port 8080. Now on the Advanced tab, in the field DSCP (TOS), 4th place (this is the number of the type used by service proxy). Nowclick on the tab ACTION, ACTION field, select MARK CONNECTION. In the field NEWCONN-MARK place CONNECTION CACHE-FULL and leave the option PASSTHROUGHmarked. Finally, click OK.




3. Vamos para a próxima regra. Clique no botão + novamente. Na aba GENERAL, no campo CHAIN, selecione a opção OUTPUT. No campo CONNECTION MARK, selecione a opção CONN-CACHE-FULL. Agora na aba ACTION, no campo ACTION, selecione a opção MARK PACKET e no campo NEW PACKET MARK, coloque PAC-CACHE-FULL. Deixe marcada a opção PASSTHROUGH. Depois clique em OK.
3. Let's go to the next rule. Click the + button again. On the General tab, in the field CHAIN,select the OUTPUT option. MARK CONNECTION In the field, select the CONN-CACHE-FULL. Now tab ACTION, ACTION field, select the field and MARK PACKET PACKETNEW MARK, place PAC-CACHE-FULL. Check the box PASSTHROUGH. Then click OK.



4. Agora a última regra do mangle. Clique novamente no botão +. Na aba GENERAL, no campo CHAIN, selecione a opção OUTPUT. No campo CONNECTION MARK, selecione CONN-CACHE-FULL. Agora clique na aba ACTION e no campo ACTION selecione RETURN. Essa regra faz com que, depois de ter marcado as conexões do proxy, todas as suas regras do mangle (caso você tenha mais regras) continuem funcionando perfeitamente.
4. Now the last rule in the mangle. Click the + button again. On the General tab, in the fieldCHAIN, select the OUTPUT option. MARK CONNECTION In the field, selectCONN-CACHE-FULL. Now click on the tab in the field ACTION ACTION and selectRETURN. This rule means that, after you have checked the connections to the proxy, all the rules of the mangle (if you have more rules) continue to function perfectly.

Depois de ter feito essas três regras, lembre de colocá-las como as três primeiras regras do mangle arrastando-as pra cima.
Once you have done these three rules, remember to place them as the first three rules of the mangle dragging them up.



Agora vamos criar um regra em FILTER pra por permitir que sua rede interna tenha acesso ao proxy.
Now let's create a rule for allowing FILTER to your internal network has access to the proxy.

5. Ainda em IP > FIREWALL, clique na aba FILTER e depois no botão +. Na aba GENERAL, no campo CHAIN, selecione a opção INPUT. No campor PROTOCOL, selecione a opção TCP, no campo DST.PORT coloque a porta do seu proxy 8080, no campo IN.INTERFACE, selecione a placa de rede da sua rede interna. Agora clique na aba ACTION. No campo ACTION, selecione a opção ACCEPT.
5. Although IP-> Firewall, click the FILTER tab and then the + button. On the General tab, in the field CHAIN​​, select INPUT. In camporee PROTOCOL, select TCP in the fieldDST.PORT put your proxy port 8080, IN.INTERFACE field, select the network card of your internal network. Now click on the tab ACTION. In the Action field, select ACCEPT.



Pronto. O proxy está devidamente funcionando. Para testar, faça um download em algum site de um programa ou arquivo em alguma máquina interna sua. Depois, baixe esse MESMO arquivo ou programa de outra máquina da rede interna e observe a velocidade desse segundo download.
Pronto. The proxy is properly working. To test, download from a site of a program or filesomewhere inside your machine. Then download the same file or program to another machine on the internal network and observe the speed of this second download.

segunda-feira, 10 de outubro de 2011

Bloquear páginas no Mikrotik (Web-Proxy) / Block pages in Mikrotik (Web-Proxy)

Neste vídeo, você vai aprender a controlar o acesso a internet de sua rede interna bloqueando sites e downloads por extensões (exe, zip, rar e etc). Para isso, você precisa dos seguintes pré-requisitos:
In this video you will learn how to control access to Internet from your internal network to block sites and downloads by extension (exe, zip, rar, etc.). For this you need the following prerequisites:
  1. Ter o serviço Web-Proxy já configurado no seu servidor Mikrotik. Se ainda não tem, veja como fazer clicando AQUI!
  1. Having the service Web-Proxy on your server already configured Mikrotik. If you have not already, check out how by clicking HERE!

Vamos começar!
Let's start

1. Clique em IP e depois em WEB PROXY. 
1. IP and then click Web Proxy.

2. Na aba ACESSE, clique no botão +. No campo SRC. ADDRESS, coloque o endereço de origem que deseja bloquear o acesso. Se quiser que a regra se aplique a qualquer endereço de origem da sua rede, não altere esse campo. Existem três formas de realizar o bloqueio:
2. On the Access tab, click the + button. SRC in the field. ADDRESS, set the source address you want to block access. If you want the rule to apply to any source address of your network, do not change this field. There are three forms of the blockade:
     a) Pelo domínio do site. Se quiser bloquear o site sexo.com.br, basta colocar no campo DST. HOST a palavra SEXO, precedida de ":".
     b) Pela palavra na URL. Se quiser bloquear qualquer site que tenha a palavra SEXO em sua URL, basta colocar no campo PATH a palavra SEXO.
     c) Pela extensão de download. Se quiser bloquear downloads de arquivos executáveis, ou seja, com extensão .EXE, basta colocar no campo PATH "*.exe". O * quer dizer que é pra bloquear qualquer coisa que venha antes de .exe
a) the website's domain. If you want to block the site sexo.com.br, just put the STD field.HOST SEX word, preceded by "."
b) the word in the URL. If you want to block any site that has the word SEX in your URL, just put the word PATH in the field SEX.
c) the extension download. If you want to block downloads of executables, that is, with.EXE, just put in the field PATH "*. exe". The * means that it is to block anything that comes before. Exe


Pronto. Agora é só repetir essa regra para todos os sites e downloads que queira bloquear.
Ready. Now just repeat this rule to all sites and downloads that you want to block.

segunda-feira, 3 de outubro de 2011

Saiba quanto será o sinal de seu ponto-a-ponto antes da implantação. / Find out how the signal from its point-to-point before the deployment.

Pessoal, No site da Mikrotik existe uma ferramenta que pode lhe auxiliar na criação de um enlace de longa distância (e pequena também se desejar).
Personal site of the Mikrotik there a tool that can assist you in creating a long distancelink (and small too if desired).
Lá você coloca as informações dos cartões wireless, antenas e cabo utilizados no ponto-a-ponto do enlace que você vai criar e ele lhe dará o nível de sinal que você pode obter (se as antenas forem alinhadas perfeitamente). Essa ferramenta lhe auxilia na hora de saber quais equipamentos você deve utilizar para alcançar o sinal desejado.
There you put the information of the wireless cards, antennas and cable used in point-to-point link that you will create and it will give you the signal you can get (if the antennas are aligned properly). This tool assists you in time to know what equipment you should use to achieve the desired signal.
http://www.mikrotik.com/test_link.php

Aproveitem!
Enjoy!