+ Responder ao Tópico



  1. #1

    Arrow Alarme sonoro na queda de link

    Eu tenho um cabo de rede reserva ligando o PCAP ao modem, entao tava aqui de bobeira e fiz o seguinte....
    usei 2 fios do cabo pra LED HDD e mais 2 fios pro BIP... vem direto pra dentro do meu quarto (onde esta o modem).. entao resolvi colocar um alarme sonoro
    quando o link cair...... vejam os passos...

    1. Script da sirene quando o link cair ... denominado ALARME
    / system script
    add name="ALARME"
    source=:for c from=1 to=50 step=1 \
    do={ \
    :set i 15
    :set x 800
    :do {\
    :beep length=400ms frequency=$x; :delay 25ms
    :set i ($i - 1);
    :set x ($x +35)
    } \
    while (($i <16) && ($i >0))
    :beep length=0 frequency=0
    }
    policy=ftp,reboot,read,write,policy,test,winbox,password

    2. Script do beep .... pra quando o link voltar -- denominado BEEP
    / system script
    add name="BEEP"
    source=:beep length=1 frequency=3000
    policy=ftp,reboot,read,write,policy,test,winbox,password

    3- Pingar um ip (nesse caso, da globo), caso o ping não responda, executar o script ALARME.
    / tool netwatch
    add host=201.7.176.59 timeout=1000ms interval=10s up-script="/ system script \
    run ALARME" down-script="/ system script run ALARME" comment="" \
    disabled=no
    4- Pingar um outro ip (nesse caso, do yahoo, e quando voltar (so quando voltar) executar o scrip BEEPP.
    / tool netwatch
    add host=200.152.161.132 timeout=1000ms interval=10s up-script="/ system script \
    run BEEP" down-script="/ system script run Sirene" comment="" \
    disabled=no
    5- Desabilitar e habilitar novamento o ping para a Globo, pra forçar o ALARME, caso contrario ele alarme uma vez e para.
    / system script
    add name="NET-DISABLE" source="/tool netwatch disable \[/tool netwatch find \
    host=201.7.176.59\]
    \n
    \n" policy=ftp,read,write,policy,test,winbox
    add name="NET-ENABLE" source="/tool netwatch enable \[/tool netwatch find \
    host=201.7.176.59\]
    \n
    \n" policy=ftp,read,write,policy,test,winbox
    / system scheduler
    add name="NET-DISABLE" on-event="/system scrip run NET-DISABLE" \
    start-date=jan/01/1970 start-time=00:00:00 interval=10s comment="" \
    disabled=no
    add name="NET-ENABLE" on-event="/system scrip run NET-ENABLE" \
    start-date=jan/01/1970 start-time=00:00:00 interval=6s comment="" \
    disabled=no

    HE ISSO PESSOAL.......... agora eu gostaria de uma ajuda......

    Uso cache full e hotspot, tudo num unico hd la em cima, na torre...
    Dentro da pasta hotspot eu coloquei uns filmes pro povao..... http://192.168.88.1/Filmes/Filmes.htm
    Acontece q quando o link cai, da aquela pagina de erro do proxy...
    TEM COMO CRIAR UMA REGRA NO NAT (ou sei la onde), PRA QUANDO O LINK CAIR, OS CLIENTES SEREM REDIRECIONADOS PRA UMA PAGINA DENTRO DO HOTSPOT ?????
    por exemplo... http://192.168.88.1/manutencao/manutencao.htm
    Agradeço desde ja a quem puder ajudar....

    http://www.turbozap.com.br - Antenas SLOT iguais as PLUTON por R$ 200,00
    Última edição por h3lyo; 21-03-2009 às 23:32.

  2. #2

  3. #3

  4. #4

    Padrão

    ta muito complicado isso ai: vai em tools netwatch adiciona o ip que voce quer pingar e em down escreve mario

    agora vai em system script e cria um script chamado mario e cola isso aqui.

    :beep frequency=660 length=100ms;
    :delay 150ms;
    :beep frequency=660 length=100ms;
    :delay 300ms;
    :beep frequency=660 length=100ms;
    :delay 300ms;
    :beep frequency=510 length=100ms;
    :delay 100ms;
    :beep frequency=660 length=100ms;
    :delay 300ms;
    :beep frequency=770 length=100ms;
    :delay 550ms;
    :beep frequency=380 length=100ms;
    :delay 575ms;
    :beep frequency=510 length=100ms;
    :delay 450ms;
    :beep frequency=380 length=100ms;
    :delay 400ms;
    :beep frequency=320 length=100ms;
    :delay 500ms;
    :beep frequency=440 length=100ms;
    :delay 300ms;
    :beep frequency=480 length=80ms;
    :delay 330ms;
    :beep frequency=450 length=100ms;
    :delay 150ms;
    :beep frequency=430 length=100ms;
    :delay 300ms;
    :beep frequency=380 length=100ms;
    :delay 200ms;
    :beep frequency=660 length=80ms;
    :delay 200ms;
    :beep frequency=760 length=50ms;
    :delay 150ms;
    :beep frequency=860 length=100ms;
    :delay 300ms;
    :beep frequency=700 length=80ms;
    :delay 150ms;
    :beep frequency=760 length=50ms;
    :delay 350ms;
    :beep frequency=660 length=80ms;
    :delay 300ms;
    :beep frequency=520 length=80ms;
    :delay 150ms;
    :beep frequency=580 length=80ms;
    :delay 150ms;
    :beep frequency=480 length=80ms;
    :delay 500ms;
    :beep frequency=510 length=100ms;
    :delay 450ms;
    :beep frequency=380 length=100ms;
    :delay 400ms;
    :beep frequency=320 length=100ms;
    :delay 500ms;
    :beep frequency=440 length=100ms;
    :delay 300ms;
    :beep frequency=480 length=80ms;
    :delay 330ms;
    :beep frequency=450 length=100ms;
    :delay 150ms;
    :beep frequency=430 length=100ms;
    :delay 300ms;
    :beep frequency=380 length=100ms;
    :delay 200ms;
    :beep frequency=660 length=80ms;
    :delay 200ms;
    :beep frequency=760 length=50ms;
    :delay 150ms;
    :beep frequency=860 length=100ms;
    :delay 300ms;
    :beep frequency=700 length=80ms;
    :delay 150ms;
    :beep frequency=760 length=50ms;
    :delay 350ms;
    :beep frequency=660 length=80ms;
    :delay 300ms;
    :beep frequency=520 length=80ms;
    :delay 150ms;
    :beep frequency=580 length=80ms;
    :delay 150ms;
    :beep frequency=480 length=80ms;
    :delay 500ms;
    :beep frequency=500 length=100ms;
    :delay 300ms;
    :beep frequency=760 length=100ms;
    :delay 100ms;
    :beep frequency=720 length=100ms;
    :delay 150ms;
    :beep frequency=680 length=100ms;
    :delay 150ms;
    :beep frequency=620 length=150ms;
    :delay 300ms;
    :beep frequency=650 length=150ms;
    :delay 300ms;
    :beep frequency=380 length=100ms;
    :delay 150ms;
    :beep frequency=430 length=100ms;
    :delay 150ms;
    :beep frequency=500 length=100ms;
    :delay 300ms;
    :beep frequency=430 length=100ms;
    :delay 150ms;
    :beep frequency=500 length=100ms;
    :delay 100ms;
    :beep frequency=570 length=100ms;
    :delay 220ms;
    :beep frequency=500 length=100ms;
    :delay 300ms;
    :beep frequency=760 length=100ms;
    :delay 100ms;
    :beep frequency=720 length=100ms;
    :delay 150ms;
    :beep frequency=680 length=100ms;
    :delay 150ms;
    :beep frequency=620 length=150ms;
    :delay 300ms;
    :beep frequency=650 length=200ms;
    :delay 300ms;
    :beep frequency=1020 length=80ms;
    :delay 300ms;
    :beep frequency=1020 length=80ms;
    :delay 150ms;
    :beep frequency=1020 length=80ms;
    :delay 300ms;
    :beep frequency=380 length=100ms;
    :delay 300ms;
    :beep frequency=500 length=100ms;
    :delay 300ms;
    :beep frequency=760 length=100ms;
    :delay 100ms;
    :beep frequency=720 length=100ms;
    :delay 150ms;
    :beep frequency=680 length=100ms;
    :delay 150ms;
    :beep frequency=620 length=150ms;
    :delay 300ms;
    :beep frequency=650 length=150ms;
    :delay 300ms;
    :beep frequency=380 length=100ms;
    :delay 150ms;
    :beep frequency=430 length=100ms;
    :delay 150ms;
    :beep frequency=500 length=100ms;
    :delay 300ms;
    :beep frequency=430 length=100ms;
    :delay 150ms;
    :beep frequency=500 length=100ms;
    :delay 100ms;
    :beep frequency=570 length=100ms;
    :delay 420ms;
    :beep frequency=585 length=100ms;
    :delay 450ms;
    :beep frequency=550 length=100ms;
    :delay 420ms;
    :beep frequency=500 length=100ms;
    :delay 360ms;
    :beep frequency=380 length=100ms;
    :delay 300ms;
    :beep frequency=500 length=100ms;
    :delay 300ms;
    :beep frequency=500 length=100ms;
    :delay 150ms;
    :beep frequency=500 length=100ms;
    :delay 300ms;
    :beep frequency=500 length=100ms;
    :delay 300ms;
    :beep frequency=760 length=100ms;
    :delay 100ms;
    :beep frequency=720 length=100ms;
    :delay 150ms;
    :beep frequency=680 length=100ms;
    :delay 150ms;
    :beep frequency=620 length=150ms;
    :delay 300ms;
    :beep frequency=650 length=150ms;
    :delay 300ms;
    :beep frequency=380 length=100ms;
    :delay 150ms;
    :beep frequency=430 length=100ms;
    :delay 150ms;
    :beep frequency=500 length=100ms;
    :delay 300ms;
    :beep frequency=430 length=100ms;
    :delay 150ms;
    :beep frequency=500 length=100ms;
    :delay 100ms;
    :beep frequency=570 length=100ms;
    :delay 220ms;
    :beep frequency=500 length=100ms;
    :delay 300ms;
    :beep frequency=760 length=100ms;
    :delay 100ms;
    :beep frequency=720 length=100ms;
    :delay 150ms;
    :beep frequency=680 length=100ms;
    :delay 150ms;
    :beep frequency=620 length=150ms;
    :delay 300ms;
    :beep frequency=650 length=200ms;
    :delay 300ms;
    :beep frequency=1020 length=80ms;
    :delay 300ms;
    :beep frequency=1020 length=80ms;
    :delay 150ms;
    :beep frequency=1020 length=80ms;
    :delay 300ms;
    :beep frequency=380 length=100ms;
    :delay 300ms;
    :beep frequency=500 length=100ms;
    :delay 300ms;
    :beep frequency=760 length=100ms;
    :delay 100ms;
    :beep frequency=720 length=100ms;
    :delay 150ms;
    :beep frequency=680 length=100ms;
    :delay 150ms;
    :beep frequency=620 length=150ms;
    :delay 300ms;
    :beep frequency=650 length=150ms;
    :delay 300ms;
    :beep frequency=380 length=100ms;
    :delay 150ms;
    :beep frequency=430 length=100ms;
    :delay 150ms;
    :beep frequency=500 length=100ms;
    :delay 300ms;
    :beep frequency=430 length=100ms;
    :delay 150ms;
    :beep frequency=500 length=100ms;
    :delay 100ms;
    :beep frequency=570 length=100ms;
    :delay 420ms;
    :beep frequency=585 length=100ms;
    :delay 450ms;
    :beep frequency=550 length=100ms;
    :delay 420ms;
    :beep frequency=500 length=100ms;
    :delay 360ms;
    :beep frequency=380 length=100ms;
    :delay 300ms;
    :beep frequency=500 length=100ms;
    :delay 300ms;
    :beep frequency=500 length=100ms;
    :delay 150ms;
    :beep frequency=500 length=100ms;
    :delay 300ms;
    :beep frequency=500 length=60ms;
    :delay 150ms;
    :beep frequency=500 length=80ms;
    :delay 300ms;
    :beep frequency=500 length=60ms;
    :delay 350ms;
    :beep frequency=500 length=80ms;
    :delay 150ms;
    :beep frequency=580 length=80ms;
    :delay 350ms;
    :beep frequency=660 length=80ms;
    :delay 150ms;
    :beep frequency=500 length=80ms;
    :delay 300ms;
    :beep frequency=430 length=80ms;
    :delay 150ms;
    :beep frequency=380 length=80ms;
    :delay 600ms;
    :beep frequency=500 length=60ms;
    :delay 150ms;
    :beep frequency=500 length=80ms;
    :delay 300ms;
    :beep frequency=500 length=60ms;
    :delay 350ms;
    :beep frequency=500 length=80ms;
    :delay 150ms;
    :beep frequency=580 length=80ms;
    :delay 150ms;
    :beep frequency=660 length=80ms;
    :delay 550ms;
    :beep frequency=870 length=80ms;
    :delay 325ms;
    :beep frequency=760 length=80ms;
    :delay 600ms;
    :beep frequency=500 length=60ms;
    :delay 150ms;
    :beep frequency=500 length=80ms;
    :delay 300ms;
    :beep frequency=500 length=60ms;
    :delay 350ms;
    :beep frequency=500 length=80ms;
    :delay 150ms;
    :beep frequency=580 length=80ms;
    :delay 350ms;
    :beep frequency=660 length=80ms;
    :delay 150ms;
    :beep frequency=500 length=80ms;
    :delay 300ms;
    :beep frequency=430 length=80ms;
    :delay 150ms;
    :beep frequency=380 length=80ms;
    :delay 600ms;
    :beep frequency=660 length=100ms;
    :delay 150ms;
    :beep frequency=660 length=100ms;
    :delay 300ms;
    :beep frequency=660 length=100ms;
    :delay 300ms;
    :beep frequency=510 length=100ms;
    :delay 100ms;
    :beep frequency=660 length=100ms;
    :delay 300ms;
    :beep frequency=770 length=100ms;
    :delay 550ms;
    :beep frequency=380 length=100ms;
    :delay 575ms;

  5. #5

  6. #6

    Padrão

    Huehueheu!!! Muito bom... e Engraçado tb!!! hueheuheuehu
    Parabéms.. Aonde vc arrumou isso?
    Última edição por Malverick; 11-06-2009 às 15:58. Razão: Removi o quote pra não flamear

  7. #7

    Padrão

    Amigos,
    utilizo este script já a algum tempo e funciona muito bem na versão 2.9.27.
    Porém acabei de instalar a versão licenciada do mikrotik v. 3.27 e nesta versão o script:

    source=:for c from=1 to=50 step=1 \
    do={ \
    :set i 15
    :set x 800
    :do {\
    :beep length=400ms frequency=$x; :delay 25ms
    :set i ($i - 1);
    :set x ($x +35)
    } \
    while (($i <16) && ($i >0))
    :beep length=0 frequency=0
    }

    Não está funcionando. Nem mesmo dá RUN quando se executa.
    Percebí que este script não roda nas versões 3 em diante.

    Alguém já descobriu o problema?
    Posta pra gente.
    Obrigado.

  8. #8

    Padrão

    Amigo tem sim, so adicionar esta regra no ip firewall nat

    add action=dst-nat chain=dstnat comment=\
    "REDIRECIONAR TODO MUNDO PARA UM SERVIDOR DE WEB" disabled=yes dst-port=\
    80 protocol=tcp src-address-list=redireciona to-addresses=192.168.254.9 \
    to-ports=80

    Ele faz o seguinte pega a porta 80 de todo mundo e redireciona para o servidor 192.168.254.9 na porta 80, onde tem uma mensagem falando algo. Ai vc implementa com o o netwatch para ficar legal, ele habilitar esta regra sozinho

    lembando que esta regra deve ficar por penultima e a ultima o redirecionamento para o proxy. OK

    falows....

    TEM COMO CRIAR UMA REGRA NO NAT (ou sei la onde), PRA QUANDO O LINK CAIR, OS CLIENTES SEREM REDIRECIONADOS PRA UMA PAGINA DENTRO DO HOTSPOT ?????
    por exemplo... http://192.168.88.1/manutencao/manutencao.htm
    Agradeço desde ja a quem puder ajudar....

  9. #9

    Padrão

    Citação Postado originalmente por marioth Ver Post
    Amigos,
    utilizo este script já a algum tempo e funciona muito bem na versão 2.9.27.
    Porém acabei de instalar a versão licenciada do mikrotik v. 3.27 e nesta versão o script:

    source=:for c from=1 to=50 step=1 \
    do={ \
    :set i 15
    :set x 800
    :do {\
    :beep length=400ms frequency=$x; :delay 25ms
    :set i ($i - 1);
    :set x ($x +35)
    } \
    while (($i <16) && ($i >0))
    :beep length=0 frequency=0
    }

    Não está funcionando. Nem mesmo dá RUN quando se executa.
    Percebí que este script não roda nas versões 3 em diante.

    Alguém já descobriu o problema?
    Posta pra gente.
    Obrigado.

    Taí o novo...

    Código :
    {
    :local count
    :local freq
     
    :for c from=1 to=50 step=1 \
    do={ \
    :set count 15
    :set freq 1900
    :do {\
    :beep length=400ms frequency=$freq; :delay 25ms
    :set count ($count - 1);
    :set freq ($freq +35)
    } \
    while (($count <16) && ($count >0))
    :beep length=0 frequency=0
    }
    }
    }

    Lembrando que não funcionou porque há algumas alterações entre as versões... Verifique o início do script.

  10. #10

    Padrão

    Nas novas versões é necessário criar uma variável(global ou local), daí setar os valores.

  11. #11

    Padrão

    Amigo, mude a porta 80 em services para outra, aí só passar a url com a porta. (ex: 192.168.254.2:8008).

  12. #12