Tuesday, 15 January 2013

Script auto change dns + flush dns


Bikin script dulu dengan nama “proteksi” source code gini:
/ip dns cache flush
/ip dns set primary-dns=208.67.222.222
/ip dns set secondary-dns=208.67.220.220

dan satu lagi dengan nama “bebas”:
/ip dns cache flush
/ip dns set primary-dns=203.130.208.18
/ip dns set secondary-dns=202.134.1.10




trus bikin scheduler nya :
/system scheduler add name="perlindungan" interval=1d start-time=08:00:00 on-event=proteksi
/system scheduler add name="pembebasan" interval=1d start-time=21:00:00 on-event=bebas
jangan lupa DNS client diarahkan ke Mikrotiknya, dan /ip dns set allow-remote-requests=yes.
Bisa juga dipaksain biar pake DNS Mikrotik pake ini (cuman copas dari tutorial disini) :
/ip firewall nat add chain=dstnat action=redirect to-ports=53 dst-port=53 protocol=udp disabled=no
/ip firewall nat add chain=dstnat action=redirect to-ports=53 dst-port=53 protocol=tcp disabled=no
Sumber : Forummikrotik

No comments:

Post a Comment