ABDURROZAK
HOME ABOUT ME MICROSITE KONTAK PERSEMBAHAN HELP
ABDURROZAK.MY.ID // MIKROTIK TUTORIAL

DNS & WEB PROXY

RB941 hAP LITE - DNS & WEB PROXY LENGKAP

Panduan mendalam implementasi DNS Server dan Web Proxy pada MikroTik RB941. DNS untuk resolve domain, Web Proxy untuk caching dan filtering konten. Konfigurasi dual: CLI (Terminal) & WinBox (GUI).

SPESIFIKASI HARDWARE RB941-2nD

RB941 hAP lite dengan kemampuan DNS Server dan Web Proxy. Cocok untuk jaringan rumah/kantor kecil dengan 10-20 client. Web Proxy bisa cache konten HTTP untuk menghemat bandwidth.

CPU
AR9344 - 650MHz
RAM
32 MB DDR2
STORAGE
16 MB FLASH
ETHERNET
4x 10/100 Mbps
DNS SERVER
Built-in
WEB PROXY
Built-in
CACHE SIZE
~16 MB
CLIENT MAX
~20-50
POWER
5V DC / USB
OS
RouterOS v6 L4
DIMENSI
113 x 89 x 28mm
BERAT
160 gram
KEMAMPUAN: RB941 support DNS Server untuk resolve domain dan Web Proxy untuk caching HTTP. Web Proxy hanya cache HTTP, tidak HTTPS (HTTPS encrypted).
KONSEP DNS & WEB PROXY FUNDAMENTAL

DNS (Domain Name System) menerjemahkan nama domain ke IP address. Web Proxy cache konten HTTP untuk menghemat bandwidth dan mempercepat akses.

DNS SERVER
DOMAIN RESOLUTION
DNS menerjemahkan nama domain (google.com) ke IP address (142.250.x.x). Client tidak perlu hafal IP.
DNS CACHE
DNS cache menyimpan hasil resolve untuk mempercepat akses berikutnya. Mengurangi query ke DNS server luar.
DNS STATIC
DNS static untuk mapping domain ke IP tertentu. Berguna untuk block domain atau local DNS.
DNS FORWARD
DNS forward meneruskan query ke DNS server lain. Berguna untuk DNS server upstream.
WEB PROXY
HTTP CACHE
Web Proxy cache konten HTTP. Jika client minta konten yang sudah di-cache, proxy langsung kirim tanpa ke internet.
BANDWIDTH SAVING
Cache menghemat bandwidth. Konten yang sering diakses tidak perlu download ulang dari internet.
FASTER ACCESS
Konten dari cache lebih cepat karena tidak perlu ke internet. Mempercepat akses web.
CONTENT FILTERING
Web Proxy bisa filter konten berdasarkan URL, domain, atau content. Block situs tertentu.
PENTING: Web Proxy hanya cache HTTP, tidak HTTPS. HTTPS encrypted, proxy tidak bisa cache. Untuk HTTPS, perlu SSL interception (lebih kompleks).
TOPOLOGI DNS & WEB PROXY SCHEMA
// TOPOLOGI DNS & WEB PROXY // [ INTERNET ] | v +-------------------+ | MIKROTIK RB941 | | DNS SERVER | Resolve domain | WEB PROXY | Cache HTTP | | | ether1: WAN | | ether2-4: LAN | | wlan1: WIFI | +-------------------+ | v [ CLIENT ] 1. Client minta DNS: google.com 2. DNS Server resolve ke 142.250.x.x 3. Client akses HTTP: http://google.com 4. Web Proxy check cache - Cache hit: kirim dari cache - Cache miss: ambil dari internet, cache 5. Client terima response
WORKING: DNS Server resolve domain ke IP. Web Proxy cache HTTP content. Client minta domain -> DNS resolve -> Proxy check cache -> kirim response.
ANIMASI DNS & PROXY LIVE FLOW

Visualisasi DNS resolution dan Web Proxy caching. Client minta domain -> DNS resolve -> Proxy cache check -> response.

INTERNET DNS SERVER MIKROTIK RB941 DNS SERVER WEB PROXY CLIENT google.com // DNS & WEB PROXY FLOW // DNS RESOLVE -> PROXY CACHE -> RESPONSE
DNS Query/Response
Proxy Cache
FLOW: Client minta domain -> DNS resolve ke IP -> Proxy check cache -> cache miss: ambil dari internet, cache -> kirim ke client.
SETUP BASIC ROUTER STEP 01

Setup basic router sebelum konfigurasi DNS dan Web Proxy.

VIA CLI
# 1. Set identity [admin@MikroTik] > /system identity set name="DNS-PROXY" # 2. Rename interface [admin@DNS-PROXY] > /interface set ether1 name="WAN" [admin@DNS-PROXY] > /interface set ether2 name="LAN1" # 3. Set IP address [admin@DNS-PROXY] > /ip address add address=192.168.10.1/24 interface=bridge # 4. DHCP Client [admin@DNS-PROXY] > /ip dhcp-client add interface=WAN disabled=no # 5. NAT [admin@DNS-PROXY] > /ip firewall nat add chain=srcnat action=masquerade out-interface=WAN # 6. Verifikasi [admin@DNS-PROXY] > /ip address print
VIA WINBOX
1
Menu: System -> Identity: DNS-PROXY
2
Menu: Interfaces: rename ether1 -> WAN
3
Menu: IP -> Addresses: 192.168.10.1/24
4
Menu: IP -> DHCP Client: add WAN
5
Menu: IP -> Firewall -> NAT: masquerade
DNS SERVER CONFIGURATION DNS

Konfigurasi DNS Server untuk resolve domain name ke IP address.

VIA CLI
# 1. Set DNS Server [admin@DNS-PROXY] > /ip dns set servers=8.8.8.8,8.8.4.4 allow-remote-requests=yes cache-size=2048KiB max-concurrent-queries=100 # 2. Verifikasi [admin@DNS-PROXY] > /ip dns print servers: 8.8.8.8, 8.8.4.4 allow-remote-requests: yes cache-size: 2048KiB # 3. Test DNS [admin@DNS-PROXY] > /ping google.com count=4
VIA WINBOX
1
Menu: IP -> DNS
2
Servers: 8.8.8.8, 8.8.4.4
3
Allow Remote Requests: yes
4
Cache Size: 2048KiB
4
Max Concurrent Queries: 100
5
Klik OK
PARAMETER DNS
PARAMETERFUNGSIREKOMENDASI
serversDNS server upstream8.8.8.8, 1.1.1.1
allow-remote-requestsAllow client queryyes
cache-sizeDNS cache size2048KiB
max-concurrent-queriesMax concurrent queries100
cache-max-ttlMax TTL cache1w
DNS SERVER POPULER
PROVIDERPRIMARYSECONDARY
Google8.8.8.88.8.4.4
Cloudflare1.1.1.11.0.0.1
OpenDNS208.67.222.222208.67.220.220
Quad99.9.9.9149.112.112.112
TIPS: Gunakan DNS server yang cepat dan reliable. Google DNS (8.8.8.8) dan Cloudflare (1.1.1.1) adalah pilihan populer. Allow Remote Requests harus yes agar client bisa query.
DNS STATIC CONFIGURATION DNS

DNS Static untuk mapping domain ke IP tertentu. Berguna untuk block domain atau local DNS.

VIA CLI
# 1. Block domain (map ke 127.0.0.1) [admin@DNS-PROXY] > /ip dns static add name="facebook.com" address="127.0.0.1" ttl=1d [admin@DNS-PROXY] > /ip dns static add name="*.facebook.com" address="127.0.0.1" # 2. Local DNS (map ke IP local) [admin@DNS-PROXY] > /ip dns static add name="server.local" address="192.168.10.50" # 3. Wildcard domain [admin@DNS-PROXY] > /ip dns static add name="*.blocked.com" address="127.0.0.1" # 4. Verifikasi [admin@DNS-PROXY] > /ip dns static print # NAME ADDRESS 0 facebook.com 127.0.0.1 1 *.facebook.com 127.0.0.1 2 server.local 192.168.10.50 # 5. Test [admin@DNS-PROXY] > /ping facebook.com HOST SIZE TTL TIME STATUS 127.0.0.1 56 1d 0ms
VIA WINBOX
1
Menu: IP -> DNS -> Tab Static
2
+ Add
3
Name: facebook.com
4
Address: 127.0.0.1 (block)
5
TTL: 1d
6
Klik OK
7
Untuk wildcard: *.facebook.com
PARAMETER DNS STATIC
PARAMETERFUNGSICONTOH
nameDomain namefacebook.com, *.facebook.com
addressIP address127.0.0.1 (block), 192.168.10.50 (local)
ttlTime to live1d, 1h, 1w
regexpRegular expression.*facebook.*
TIPS: DNS Static untuk block domain dengan map ke 127.0.0.1. Wildcard (*.domain.com) untuk block semua subdomain. TTL menentukan berapa lama cache berlaku.
DNS FORWARD CONFIGURATION DNS

DNS Forward untuk meneruskan DNS query ke DNS server lain. Berguna untuk DNS server upstream.

VIA CLI
# 1. Set DNS Forward [admin@DNS-PROXY] > /ip dns set servers=8.8.8.8,1.1.1.1 allow-remote-requests=yes # 2. Verifikasi [admin@DNS-PROXY] > /ip dns print servers: 8.8.8.8, 1.1.1.1 allow-remote-requests: yes # 3. Test [admin@DNS-PROXY] > /ping google.com count=4
VIA WINBOX
1
Menu: IP -> DNS
2
Servers: 8.8.8.8, 1.1.1.1
3
Allow Remote Requests: yes
4
Klik OK
TIPS: DNS Forward meneruskan query ke DNS server upstream. Gunakan DNS server yang cepat dan reliable. Allow Remote Requests harus yes agar client bisa query.
DNS CACHE CONFIGURATION DNS

DNS Cache menyimpan hasil resolve domain untuk mempercepat akses berikutnya.

VIA CLI
# 1. Set cache size [admin@DNS-PROXY] > /ip dns set cache-size=2048KiB cache-max-ttl=1w # 2. Flush cache [admin@DNS-PROXY] > /ip dns cache flush # 3. View cache [admin@DNS-PROXY] > /ip dns cache print # NAME ADDRESS TTL 0 google.com 142.250.x.x 1d 1 facebook.com 157.240.x.x 1d # 4. Clear cache [admin@DNS-PROXY] > /ip dns cache flush
VIA WINBOX
1
Menu: IP -> DNS
2
Cache Size: 2048KiB
3
Cache Max TTL: 1w
4
Tab Cache: lihat cache
5
Flush Cache: clear cache
TIPS: DNS Cache mempercepat akses domain yang sering diakses. Cache size 2048KiB cukup untuk kebanyakan kasus. Flush cache jika ada masalah DNS.
WEB PROXY CONFIGURATION PROXY

Web Proxy untuk cache konten HTTP dan filter konten.

VIA CLI
# 1. Enable Web Proxy [admin@DNS-PROXY] > /ip proxy set enabled=yes listen-address=192.168.10.1 port=8080 anonymous=yes cache-administrator=admin max-cache-object-size=4096KiB max-cache-size=16384KiB max-client-connections=100 max-server-connections=100 # 2. Verifikasi [admin@DNS-PROXY] > /ip proxy print enabled: yes listen-address: 192.168.10.1 port: 8080 anonymous: yes # 3. Verifikasi cache [admin@DNS-PROXY] > /ip proxy access print
VIA WINBOX
1
Menu: IP -> Web Proxy
2
Enabled: yes
3
Listen Address: 192.168.10.1
4
Port: 8080
5
Anonymous: yes
6
Max Cache Object Size: 4096KiB
7
Max Cache Size: 16384KiB
8
Klik OK
PARAMETER WEB PROXY
PARAMETERFUNGSIREKOMENDASI
enabledEnable proxyyes
listen-addressListen address192.168.10.1
portProxy port8080
anonymousAnonymous proxyyes
max-cache-object-sizeMax object size4096KiB
max-cache-sizeMax cache size16384KiB
max-client-connectionsMax client connections100
max-server-connectionsMax server connections100
TIPS: Web Proxy hanya cache HTTP, tidak HTTPS. Max cache size 16384KiB (16MB) cukup untuk RB941. Anonymous yes untuk anonymous proxy.
WEB PROXY ACCESS PROXY

Web Proxy Access untuk filter konten berdasarkan URL, domain, atau content.

VIA CLI
# 1. Block domain [admin@DNS-PROXY] > /ip proxy access add dst-host="facebook.com" action=deny [admin@DNS-PROXY] > /ip proxy access add dst-host="*.facebook.com" action=deny # 2. Block by path [admin@DNS-PROXY] > /ip proxy access add dst-host="*.youtube.com" dst-path="/watch*" action=deny # 3. Block by content [admin@DNS-PROXY] > /ip proxy access add dst-host="*" comment="block-adult" action=deny # 4. Allow specific [admin@DNS-PROXY] > /ip proxy access add dst-host="google.com" action=allow # 5. Verifikasi [admin@DNS-PROXY] > /ip proxy access print # DST-HOST DST-PATH ACTION 0 facebook.com deny 1 *.facebook.com deny 2 *.youtube.com /watch* deny 3 google.com allow
VIA WINBOX
1
Menu: IP -> Web Proxy -> Tab Access
2
+ Add
3
Dst. Host: facebook.com
4
Action: deny
5
Klik OK
6
Untuk wildcard: *.facebook.com
PARAMETER PROXY ACCESS
PARAMETERFUNGSICONTOH
dst-hostDestination hostfacebook.com, *.facebook.com
dst-pathDestination path/watch*, /video*
actionActionallow, deny
commentCommentblock-facebook
TIPS: Proxy Access untuk filter konten berdasarkan URL, domain, atau path. Wildcard (*.domain.com) untuk match semua subdomain. Action allow untuk allow, deny untuk block.
WEB PROXY CACHE PROXY

Web Proxy Cache untuk cache konten HTTP.

VIA CLI
# 1. View cache [admin@DNS-PROXY] > /ip proxy cache print # URL SIZE 0 http://google.com/ 10KB 1 http://facebook.com/ 15KB # 2. Clear cache [admin@DNS-PROXY] > /ip proxy cache flush # 3. Cache stats [admin@DNS-PROXY] > /ip proxy print max-cache-size: 16384KiB cache-used: 256KiB cache-hit-rate: 45%
VIA WINBOX
1
Menu: IP -> Web Proxy
2
Tab Cache: lihat cache
3
Flush Cache: clear cache
4
Lihat cache stats
TIPS: Web Proxy Cache hanya cache HTTP. Cache hit rate menunjukkan persentase cache hit. Flush cache jika ada masalah.
TRANSPARENT PROXY PROXY

Transparent Proxy untuk redirect HTTP traffic ke proxy tanpa konfigurasi client.

VIA CLI
# 1. Enable transparent proxy [admin@DNS-PROXY] > /ip proxy set enabled=yes # 2. Redirect HTTP to proxy [admin@DNS-PROXY] > /ip firewall nat add chain=dstnat protocol=tcp dst-port=80 action=redirect to-ports=8080 in-interface=bridge # 3. Verifikasi [admin@DNS-PROXY] > /ip firewall nat print # CHAIN PROTO DST-PORT ACTION TO-PORTS 0 dstnat tcp 80 redirect 8080
VIA WINBOX
1
Menu: IP -> Web Proxy: Enabled yes
2
Menu: IP -> Firewall -> NAT
3
+ Add
4
Chain: dstnat
5
Protocol: tcp, Dst. Port: 80
6
Action: redirect, To Ports: 8080
7
In. Interface: bridge
8
Klik OK
TIPS: Transparent Proxy redirect HTTP traffic ke proxy tanpa konfigurasi client. Client tidak perlu set proxy. Hanya HTTP, tidak HTTPS.
DNS + WEB PROXY COMBINED COMBINED

Kombinasi DNS dan Web Proxy untuk optimalisasi.

VIA CLI
# 1. DNS Server [admin@DNS-PROXY] > /ip dns set servers=8.8.8.8,1.1.1.1 allow-remote-requests=yes cache-size=2048KiB # 2. DNS Static (block) [admin@DNS-PROXY] > /ip dns static add name="facebook.com" address="127.0.0.1" # 3. Web Proxy [admin@DNS-PROXY] > /ip proxy set enabled=yes listen-address=192.168.10.1 port=8080 # 4. Proxy Access (filter) [admin@DNS-PROXY] > /ip proxy access add dst-host="*.youtube.com" action=deny # 5. Transparent Proxy [admin@DNS-PROXY] > /ip firewall nat add chain=dstnat protocol=tcp dst-port=80 action=redirect to-ports=8080 in-interface=bridge # 6. Verifikasi [admin@DNS-PROXY] > /ip dns print [admin@VLAN-GW] > /ip dns static print [admin@VLAN-GW] > /ip proxy print [admin@VLAN-GW] > /ip proxy access print
VIA WINBOX
1
Menu: IP -> DNS: set servers, cache
2
Tab Static: add block domain
3
Menu: IP -> Web Proxy: enable
4
Tab Access: add filter
5
Menu: IP -> Firewall -> NAT: redirect
TIPS: Kombinasi DNS + Web Proxy untuk optimalisasi. DNS untuk resolve dan block domain. Web Proxy untuk cache HTTP dan filter konten.
MONITORING DNS & PROXY MONITORING

Monitor DNS dan Web Proxy untuk memastikan bekerja dengan baik.

VIA CLI
# 1. DNS stats [admin@DNS-PROXY] > /ip dns print # 2. DNS cache [admin@DNS-PROXY] > /ip dns cache print # 3. Proxy stats [admin@DNS-PROXY] > /ip proxy print # 4. Proxy cache [admin@DNS-PROXY] > /ip proxy cache print # 5. Proxy access [admin@DNS-PROXY] > /ip proxy access print # 6. Test DNS [admin@DNS-PROXY] > /ping google.com count=4
VIA WINBOX
1
Menu: IP -> DNS: lihat stats
2
Tab Cache: lihat cache
3
Menu: IP -> Web Proxy: lihat stats
4
Tab Cache: lihat cache
5
Tab Access: lihat access rules
TIPS: Monitor DNS dan Proxy secara berkala. Cek cache hit rate, cache size, dan access rules. Flush cache jika ada masalah.
TROUBLESHOOTING SUPPORT

Masalah umum DNS dan Web Proxy dan solusinya.

DNS TIDAK RESOLVE
KEMUNGKINAN PENYEBAB:
1. DNS Server tidak aktif
2. DNS Server salah
3. Allow Remote Requests tidak yes
4. Koneksi ke DNS server tidak ada
SOLUSI: Cek DNS Server status. Cek DNS Server IP. Cek Allow Remote Requests. Cek koneksi ke DNS server.
WEB PROXY TIDAK CACHE
KEMUNGKINAN PENYEBAB:
1. Web Proxy tidak aktif
2. Transparent Proxy tidak aktif
3. Max cache size terlalu kecil
4. HTTPS (tidak bisa cache)
SOLUSI: Cek Web Proxy status. Cek Transparent Proxy. Cek Max cache size. Ingat: HTTPS tidak bisa cache.
PROXY ACCESS TIDAK FILTER
KEMUNGKINAN PENYEBAB:
1. Proxy Access rule salah
2. Transparent Proxy tidak aktif
3. Rule order salah
4. HTTPS (tidak bisa filter)
SOLUSI: Cek Proxy Access rule. Cek Transparent Proxy. Cek rule order. Ingat: HTTPS tidak bisa filter.
DNS STATIC TIDAK BLOCK
KEMUNGKINAN PENYEBAB:
1. DNS Static rule salah
2. Domain salah
3. TTL expired
4. DNS cache tidak flush
SOLUSI: Cek DNS Static rule. Cek domain. Cek TTL. Flush DNS cache.
DIAGNOSTIC COMMANDS
# DNS > /ip dns print > /ip dns cache print > /ip dns cache flush > /ip dns static print # Web Proxy > /ip proxy print > /ip proxy cache print > /ip proxy access print # Test > /ping google.com count=4
BEST PRACTICE TIPS
USE RELIABLE DNS
Gunakan DNS server yang cepat dan reliable. Google DNS (8.8.8.8) dan Cloudflare (1.1.1.1) adalah pilihan populer.
DNS CACHE
DNS Cache mempercepat akses domain yang sering diakses. Cache size 2048KiB cukup untuk kebanyakan kasus.
DNS STATIC
DNS Static untuk block domain atau local DNS. Wildcard (*.domain.com) untuk block semua subdomain.
WEB PROXY CACHE
Web Proxy cache HTTP untuk menghemat bandwidth. Max cache size 16384KiB cukup untuk RB941.
PROXY ACCESS
Proxy Access untuk filter konten berdasarkan URL, domain, atau path. Wildcard untuk match semua subdomain.
TRANSPARENT PROXY
Transparent Proxy redirect HTTP traffic ke proxy tanpa konfigurasi client. Hanya HTTP, tidak HTTPS.
MONITOR REGULARLY
Monitor DNS dan Proxy secara berkala. Cek cache hit rate, cache size, dan access rules.
HTTPS LIMITATION
Ingat: Web Proxy hanya cache HTTP, tidak HTTPS. HTTPS encrypted, proxy tidak bisa cache atau filter.
CHEATSHEET QUICK REF
DNS & PROXY COMMANDS
# DNS SERVER > /ip dns set servers=8.8.8.8,1.1.1.1 allow-remote-requests=yes cache-size=2048KiB > /ip dns print > /ip dns cache print > /ip dns cache flush # DNS STATIC > /ip dns static add name=facebook.com address=127.0.0.1 > /ip dns static add name=*.facebook.com address=127.0.0.1 > /ip dns static print # WEB PROXY > /ip proxy set enabled=yes listen-address=192.168.10.1 port=8080 > /ip proxy print > /ip proxy cache print # PROXY ACCESS > /ip proxy access add dst-host=*.youtube.com action=deny > /ip proxy access add dst-host=google.com action=allow > /ip proxy access print # TRANSPARENT PROXY > /ip firewall nat add chain=dstnat protocol=tcp dst-port=80 action=redirect to-ports=8080 in-interface=bridge # TEST > /ping google.com count=4
ABDURROZAK.MY.ID // JARINGAN SOSIAL

s.id

Link Tree Utama

GitHub

Repositori Kode

Instagram

Galeri Visual

Threads

Diskusi Ringkas

Facebook

Jaringan Sosial

TikTok

Konten Video Pendek

YT Teacher

Edukasi & Tutorial

YT Course

Materi Pembelajaran

YT Studio

Produksi Konten

Hashnode

Artikel Teknis

WhatsApp

Komunikasi Langsung

Email

abdurrozak.skom@gmail.com