Você está na página 1de 4

Configurar Proxy no Mikrotik / Configure the Proxy Mikrotik

Neste tutorial, voc vai aprender a realizar a configurao de Proxy no seu Mikrotik. Nesse turorial, eu utilizo a verso 5.5. In this tutorial you will learn to perform the proxy setting in your Mikrotik. In this turorial I use version 5.5. Conceito resumido: Concept summary: Para quem no sabe, o Proxy um conceito muito utilizado para fazer o CACHE de pginas acessadas em sua rede. Exemplo: Quando a mquina A acessa o site www.terra.com.br, seu servidor de internet (Mikrotik) vai no servidor do TERRA, traz a pgina solicita, armazena no CAHCE do servidor de internet (Mikrotik) e depois mostra essa pgina pra mquina A. Quando a mquina B acessa o mesmo site, www.terra.com.br, o servidor faz um consulta em seu CACHE, e se ele j tiver essa pgina armazenada ele j mostra pra mquina B, evitando assim de ir novamente na internet para buscar essa informao. Com isso voc ganha agilidade ao abrir as pginas e economia na utilizao do link. For those unaware, the proxy is a concept often used to cache pages accessed on your network. Example: When the machine www.terra.com.br A accesses the site, your Internet Service Provider (Mikrotik) the server will TERRA, brings the page requests, stores the Internet server CAHCE (Mikrotik) and then displays this page for machine A.When the machine B accesses the same site, www.terra.com.br, the server makes aquery in its cache, and if it has already stored this page he shows to machine B, thus avoiding going back to check on the Internet this information. With it you gain speed by opening the pages and economic use of the link. Para isso, voc vai precisar dos seguintes pr-requisitos: For this you will need the following prerequisites: 1. Ter um servidor Mikrotik instalado e acessando a internet normalmente. 2. Sua rede interna tambm deve est acessando a internet normalmente. 1. Mikrotik have a server installed and accessing the internet normally. 2. Your internal network should also accessing the internet normally. Vamos comear! Let's start! 1. Vamos comear realizando a configurao do Proxy. Clique em IP e depois WEB PROXY. 1. Let's start doing the Proxy configuration. IP and then click Web Proxy.

2. Na aba access, clique no boto WEB PROXY SETTINGS. Na aba GENERAL, Marque o campo ENABLE. No campo PORT, coloque uma porta da qual o proxy vai utilizar (utilize uma porta acima de 1024). Se voc quiser um proxy transparente, deixe os campos PARENTE PROXY e PARENT PROXY PORT vazios. No campo MAX. CACHE SIZE, coloque o tamanho que o seu cache pode ocupar no disco. No meu caso eu coloquei um valo ILIMITADO, visto que, eu no uso meu HD pra mais nada. Marque a opo CACHE ON DISK para que o cache seja armazenado no disco. No campo MAX CLIENTS CONNECTIONS, coloque a quantidade mxima de clientes que podem se conectaro no seu proxy. No campo MAX FRESH TIME, coloque quanto tempo as pginas podem ficar armazenadas no seu cache (no sugiro colocar tempo muito longo, pois, voc pode est mostrando informaes antigas para seus clientes). Marque a opo ALWAYS FROM CACHE para que as requisies sempre busquem primeiro as pginas no cache. Depois, clique no boto OK. 2. Access tab, click the WEB PROXY SETTINGS. On the General tab, check theENABLE field. In the Port field, enter a port from which the proxy will use (use a port above 1024). If you want a transparent proxy, leave the fields and PARENT PARENTPROXY PROXY PORT empty. In the MAX field. CACHE SIZE, place the size of yourcache can occupy on disk. In my case I put a ditch UNLIMITED, since I do not use my HD for anything else. Check the ON DISK CACHE so that the cache is stored on disk.MAX CONNECTIONS CLIENTS In the field, put the maximum amount of clients that canconnect to your proxy. In the field MAX FRESH TIME, place and time the pages can be stored in its cache (do not suggest putting very long time, because you are showing old information to their customers). Check the boxe ALWAYS FROM CACHE requests to always seek first the pages in the cache. Then click the OK button.

3. Agora, vamos criar uma regra para forar todas as conexes de acesso HTTP da sua rede interna a passar pelo proxy. Clique em IP e depois em FIREWALL. 3. Now, let's create a rule to force all HTTP connections to access your internal network to pass through the proxy. IP and then click on Firewall.

4. Na aba NAT, clique no boto +. Na aba GENERAL, no campo CHAIN, selecione a opo DSTNAT. No campo PROTOCOL, selecione o protocolo TCP. No campo DST. PORT, coloque a porta 80 e no campo IN. INTERFACE, selecione a placa de rede da rede que passar pelo proxy. Agora clique na aba ACTION. No campo ACTION, selecione a opo REDIRECT. No campo TO PORTS, coloque a mesma porta que voc escolheu l nas configuraes do WEB PROXY. Depois clique em OK. 4. NAT tab, click the + button. On the General tab, in the field CHAIN, select the optionDSTNAT. In the Protocol field, select TCP. In the STD field. PORT, place the port 80 and the field IN. INTERFACE, select the network card of the network that pass through theproxy. Now click on the tab ACTION. In the Action field, select the

REDIRECT option.PORTS TO on the field, put the same port you chose there in the Web Proxy settings.Then click OK. Explicando: Essa regra que voc configurou diz o seguinte: Todo o trfego que seja do protocolo tcp, com destino de porta 80 (a porta padro de acesso a pginas de internet HTTP) entrando pela placa de rede local deve ser direcionado para a porta 8080 (ou a porta que voc escolheu). Assim, voc vai garantir que todo trfego HTTP vai passar pelo seu proxy. Explaining: This rule says that you have configured the following: All traffic is TCP protocol with destination port 80 (the default port to access web pages HTTP) enteringthe local network card should be directed to port 8080 (or the port you chose). Thus, you will ensure that all HTTP traffic will pass through your proxy.

5. Pronto, agora todo o seu trfego de acesso a pginas de internet est passando pelo seu proxy e seu cache j est funcionando.

Você também pode gostar