Menú principal

regras para Mikrotik

Publicado por nyo, Noviembre 21, 2019, 09:06:19 PM

Tema anterior - Siguiente tema

nyo

Espero que vocês gostem , pois para mim funciona muito bem no Mikrotik versão 6.45.7



    /ip firewall address-list
    remove [find list=sites-fora]
    remove [find list=DNS-locais]

    add address=10.0.0.0/8 disabled=no list=DNS-locais
    add address=172.16.0.0/12 disabled=no list=DNS-locais
    add address=192.168.0.0/16 disabled=no list=DNS-locais
    add address=192.168.10.2 disabled=no list=DNS-locais

    /ip firewall mangle
    remove [find new-routing-mark=Raptor dst-port="80"]
    remove [find new-routing-mark=Raptor protocol="udp" dst-port="53"]
    remove [find new-routing-mark=Raptor protocol="tcp" dst-port="53"]

    add action=mark-routing chain=prerouting comment=RaptorCACHE disabled=yes \
    dst-port=80 new-routing-mark=Raptor \
    passthrough=no protocol=tcp src-address=!192.168.10.2
    add action=mark-routing chain=prerouting disabled=yes dst-address-list=!DNS-locais \
    dst-port=53 new-routing-mark=Raptor passthrough=yes protocol=udp \
    src-address=!192.168.10.2
    add action=mark-routing chain=prerouting disabled=yes dst-address-list=!DNS-locais \
    dst-port=53 new-routing-mark=Raptor passthrough=yes protocol=tcp \
    src-address=!192.168.10.2

    /ip route
    remove [find gateway="192.168.10.2"]
    remove [find routing-mark=Raptor]
    add check-gateway=ping disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=\
    192.168.10.2 routing-mark=Raptor scope=30 target-scope=10

     /tool netwatch
     remove [find host=192.168.10.2]
     add disabled=no down-script="ip firewall mangle set [ find new-routing-mark=Ra\
    ptor ] disabled=yes\r\
    \n ip route set [ find routing-mark=Raptor ] disabled=yes\r\
\n\r\
    \n ip dns static set [ find name=www.wpad ] disabled=yes\r\
    \n ip dns static set [ find name=Raptorcache.lan ] disabled=yes\r\
    \n ip dns static set [ find name=celular ] disabled=yes\r\
    \n ip dns static set [ find name=certificado.lan ] disabled=yes\r\
    \n" host=192.168.10.2 interval=3s timeout=1s up-script="ip firewall mangle s\
    et [ find new-routing-mark=Raptor ] disabled=no\r\
\n ip route set [ find routing-mark=Raptor ] disabled=no\r\
    \n\r\
    \n ip dns static set [ find name=www.wpad ] disabled=no\r\
    \n ip dns static set [ find name=Raptorcache.lan ] disabled=no\r\
    \n ip dns static set [ find name=celular ] disabled=no\r\
    \n ip dns static set [ find name=certificado.lan ] disabled=no\r\
    \n"




Essa regra redirecionara seu Mikrotik e pode ser usada com outros Qos, bom proveito galera ... ^^