Skip to main content

Blocking website using DNS static in mikrotik router

Cara Blokir website porno atau judi dengan DNS static menggunakan script otomatis berdasarkan Keyword pilihan.
saya bingung buat judulnya tapi seperti itulah maksudnya ??
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 blog saya arahkan ke ip local 127.0.0.1 kalian bisa 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 saya 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 saya buat lengkap maaf english saya rada belepotan :p semoga 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~"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 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
##################################################

Comments

Popular posts from this blog

How to disable Autoconfiguration IPv4 Address

How to disable Autoconfiguration IPv4 Address Sometime your windows get error, they can not connect to the internet or appear a message likes "conflict IP address" Enter: Run > cmd > ipconfig /all You may see the following issues: To fix it, enter these from Command Prompt: netsh interface ipv4 show inter netsh interface ipv4 set interface xx dadtransmits=0 store=persistent change xx with idx number your local area connection ( 11 for my case ) then restart your computer. If you want to disable DHCP Client: Run > services.msc > disable DHCP Client service note: if you disable DHCP Client, your computer cannot get ip from DHCP Server. You must setup your IP manually.

Virus ".micro File Extentions"

.micro virus....!!! yeah.... this is ransomware virus (such as crytolock in 2015). This virus make all your file ( such as document,photo etc) turned to " .micro File Extentions " and make that's file unable to accessed/opened. It has encrypted your files and now they want money to give you the unlock key. This virus ( .micro File Extension) is a very harmful infection that silently infiltrates into targeted windows computer without seeking for any approval and hides itself behind the system background. You won’t recognize its arrival as it infiltrates very secretly and via various internet sources. Below some of the common source are discussion that makes invasion of harmful parasites into compromised machine. Social Media : Visiting malicious websites, unsafe web pages, phishing domain and unauthentic web pages are the major ways for the invasion of creepy computer threats. Drive By Download : This very malware usually comes bundled with freeware software installe...

How to see Product key such as Office or Windows

Sometimes you want to reinstall Windows or Microsoft Office, but the serial number of Windows or Microsoft Office are missing or illegible etc. You can use ProduKey, this software will be your hero hehehehehe. ProduKey is a small utility that displays the ProductID and the CD-Key of Microsoft Office (Microsoft Office 2003, Microsoft Office 2007), Windows (Including Windows 7 and Windows Vista), Exchange Server, and SQL Server installed on your computer. You can view this information for your current running operating system, or for another operating system/computer - by using command-line options. Supported Products List: Microsoft Windows 98/ME Microsoft Windows 2000 Microsoft Windows NT Microsoft Windows XP Microsoft Windows Vista Microsoft Windows Server 2003 Microsoft Windows 7 (Doesn't work with Microsoft Volume Licensing) Microsoft Windows 8 (Doesn't work with Microsoft Volume Licensing) Microsoft Office 2000 (Only ProductID is displayed) Microsoft Offic...