IT Support, IT Maintenance, CCTV, Web Design, Intallasi Jaringan LAN / FO / Wireless, PTP, Networking, Wifi, Router Mikrotik.

Cara Blokir website porno atau judi dengan DNS static menggunakan script otomatis berdasarkan Keyword pilihan.

Notes:

  1. jangan langsung pasang pelajari dulu scripnya terutama untuk kata kunci (keyword) sebaiknya ubah dulu keywordnya karena di contoh saya masukan detik dan kompas
  2. secara default website yang saya block saya arahkan ke ip local 127.0.0.1 kalian bisa mengarahkan ke situs lain misalkan untuk ip internet positif di ip 36.86.63.185
  3. Untuk TTL secara default selama 24jam (1d), tinggal rubah aja misalkan hanya 6 jam 06:00:00
  4. silahkan masukan di schedule mikrotik atau lewat script bebas saja dan sebaiknya time running jangan terlalu cepat saya pribadi set hanya di 10 menit
  5. script ini sedikit makan resource jadi maaf untuk RB plastik (yang lama) sebaiknya atur waktu timing running sedikit lebih lama.
  6. descripsi sudah saya buat lengkap maaf english saya belepotan :psemoga sukses…

#======================================
# 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~”ads” || name~”xxx” ||
name~”xnxx”) && (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 info 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 info like Internet positif 36.86.63.185
# you can change for how long TTL time can bock for site

}
}
# end script

 

Sumber : BuanaNet Pbun 

0 views

Related Post :


Follow at Facebook

Contact Us »

Email.
  info@putunik.com
  info@tunickservice.com
Hp.
  0819 1616 2221 /
  085 333 767671 /
  0815 1415 6669
Adddress.
  Jl. Batu Intan III no 108, BatuBulan

Our Services »

IT Maintenance
IT Konsultan
Service Computer/Laptop
Hardware/Software
Virus/Error/Blank dll
Data Recovery
Networking
Server Internet
Mikrotik
Access Point | PTP
Web Design
Web Development

ADS