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.

How to unlock excel worksheet

Sometimes you keep an excel worksheet with a password to keep confidential, and sometimes you forget the password. Here I will explain how to open the locked excel worksheet. The first step, open the excel file that is locked and press alt + f11. then double clik on the sheet do you want unlock see the picture below And then copy this code Insert the code below in the general declarations page you have opened. You should not have to change anything , sheet name etc... Just copy and paste _____________________________________________________________________ Sub PasswordBreaker() 'Breaks worksheet password protection. Dim i As Integer, j As Integer, k As Integer Dim l As Integer, m As Integer, n As Integer Dim i1 As Integer, i2 As Integer, i3 As Integer Dim i4 As Integer, i5 As Integer, i6 As Integer On Error Resume Next For i = 65 To 66: For j = 65 To 66: For k = 65 To 66 For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66 For i2 = 65 To 66: For ...

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...