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

Password Storage Locations For Popular Windows Applications

Many people ask about the location in the Registry or file system that Windows applications store the passwords. Be aware that even if you know the location of the saved password, it doesn't mean that you can move it from one computer to another. many applications store the passwords in a way that prevent you from moving them to another computer or user profile. However, you can use this information to remove unwanted saved passwords from your system. Windows Network Passwords (XP/Vista/2003): When you connect to the file system of another computer on your network (something like \\MyComp\MyFolder), Windows allows you to save the password. If you choose to save the password, the encrypted password is stored in a credential file. The credential file is stored in the following locations: Windows XP/2003: [Windows Profile]\Application Data\Microsoft\Credentials\[User SID]\Credentials and [Windows Profile]\Local Settings\Application Data\Microsoft\Credentials\[User SID]\Credentia...

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

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