Cara Blokir Website Dengan Dns Static Mikrotik Menurut Keyword

Cara Blokir situs dengan DNS static memakai script otomatis menurut Keyword pilihan.

aku resah buat judulnya tapi menyerupai itulah maksudnya 😁

Notes:
1. jangan eksklusif pasang pelajari dulu scripnya terutama untuk kata kunci (keyword) sebaiknya ubah dulu keywordnya alasannya di teladan aku masukan detik dan kompas
2. secara default website yang aku blog aku arahkan ke ip local 127.0.0.1 kalian dapat mgarahkan ke situs lain misalkan untuk ip internet poisitif di ip 36.86.63.185
3. Untuk TTL secara default selama 24jam (1d), tinggal rubah aja misalkan hanya 6 jam
4. silahkan masukan di shcedule mikrotik atau lewat script bebas saja dan sebaiknya time running jangan terlalu cepat aku pribadi set hanya 10 menit
5. script ini sedikit makan resource jadi maaf untuk 750 kebawah sebaiknya atur waktu timing running sedikit lebih lama.
6. descripsi sudah aku buat lengkap maaf english aku rada belepotan :p biar sukses...

Pastikan hanya memakai DNS Mikrotik:

/ip firewall nat add action=redirect chain=dstnat comment=DNS dst-port=53 protocol=tcp to-ports=53 add action=redirect chain=dstnat dst-port=53 protocol=udp to-ports=53 
########################################################################## # Scrypt by BuanaNET # fb.com/buananet.pangkalanbun # Url Blocked From DNS Static ########################################################################## # Find all entry on dns cache :foreach i in=[/ip dns cache all find where (name "poker" || name "porn" || name "cheat" || name "detik" ||  name "kompas") && (type="A") ] do={ # find and filtering keyword and only find record for type A # for keyword just add keyword || name "KEYWORD") before && (type="A") ########################################################################## :local tmpDNSsite [/ip dns cache get $i name]; :local tmpDNSip [/ip dns cache get $i address]; # save to local cache by string ########################################################################## delay delay-time=10ms # wait for 10ms ########################################################################## :if ( [/ip dns static find where name=$tmpDNSsite ] = "") do={  # chek for no more duplicate site on cache ########################################################################## :log warning ("Added site to block on dns: $tmpDNSsite : $tmpDNSip"); # show gosip on warning log ########################################################################## /ip dns static add name=$tmpDNSsite address=127.0.0.1 ttl="1d 00:00:00" comment="Site Block for $tmpDNSsite : $tmpDNSip"; # add site to dns static entry if null # you can change address=127.0.0.1 to another ip address or your bloked site gosip like Internet aktual 36.86.63.185 # you can change for how long TTL time can bock for site ########################################################################## } } # end script ########################################################################## 


Sumber http://www.o-om.com


EmoticonEmoticon