🔌 Guias de roteador
Configuração do sistema operat...
Como executar scripts em cenários multi-WAN no Mikrotik
2min
para sincronizar 2 ou mais ips públicos, você precisa criar um script no mikrotik com as seguintes linhas 1 2 1 2 wans /ip route remove \[find comment=ddns wan] replace \<gateway wan2> with the gateway of the second line (wan) /ip route add dst address=185 236 104 114 gateway=\<gateway wan2> comment=ddns wan in the user1 and pass1 fields, enter the user name (username) and password of your account (first network) \ tool fetch url=" https //ddns flashstart com/nic/update?hostname=\&myip=\&wildcard=nochg\&username=user1\&password=pass1 " do the same thing for user2 and pass2 please note to synchronize the second public ip you must enter the second network within your dashboard ( network menu ) \ tool fetch url=" https //ddns2 flashstart com/nic/update?hostname=\&myip=\&wildcard=nochg\&username=user2\&password=pass2 " also copy and paste if following lines in order to delete previously created static routes and clear the cache /ip route remove \[find comment=ddns wan] /ip dns cache flush below are the scripts to be used in the case of 3 and 4 wans please note\ as explained above, you must replace the gateway wan,user and pass fields with your own data 2 3 2 3 wans /ip route remove \[find comment=ddns wan] /ip route add dst address=185 236 104 114 gateway=\<gateway wan2> comment=ddns wan /ip route add dst address=185 236 104 124 gateway=\<gateway wan3> comment=ddns wan \ tool fetch url=" https //ddns flashstart com/nic/update\\?hostname=\&myip=\&wildcard=nochg\&username=user1\&password=pass1 " \ tool fetch url=" https //ddns2 flashstart com/nic/update\\?hostname=\&myip=\&wildcard=nochg\&username=user2\&password=pass2 " \ tool fetch url=" https //ddns3 flashstart com/nic/update\\?hostname=\&myip=\&wildcard=nochg\&username=user3\&password=pass3 " /ip route remove \[find comment=ddns wan] /ip dns cache flush 3 4 3 4 wans /ip route remove \[find comment=ddns wan] /ip route add dst address=185 236 104 114 gateway=\<gateway wan2> comment=ddns wan /ip route add dst address=185 236 104 124 gateway=\<gateway wan3> comment=ddns wan /ip route add dst address=185 236 104 134 gateway=\<gateway wan4> comment=ddns wan \ tool fetch url=" https //ddns flashstart com/nic/update\\?hostname=\&myip=\&wildcard=nochg\&username=user1\&password=pass1 " \ tool fetch url=" https //ddns2 flashstart com/nic/update\\?hostname=\&myip=\&wildcard=nochg\&username=user2\&password=pass2 " \ tool fetch url=" https //ddns3 flashstart com/nic/update\\?hostname=\&myip=\&wildcard=nochg\&username=user3\&password=pass3 " \ tool fetch url=" https //ddns4 flashstart com/nic/update\\?hostname=\&myip=\&wildcard=nochg\&username=user4\&password=pass4 " /ip route remove \[find comment=ddns wan] /ip dns cache flush finalmente, é necessário criar um agendador para executar automaticamente o script, por exemplo, a cada minuto a partir do seu dashboard, no menu networks, pode verificar o estado das suas várias redes se tudo estiver a funcionar corretamente, deverá ver os vários ips públicos e o estado da sincronização outras maneiras de perguntar como executar scripts em cenários de múltiplas wan no mikrotik executando scripts em cenários de múltiplas wan no mikrotik como gerenciá los