Home / Mikrotik / [05] – Setting Mikrotik Blok Situs HTTP (Port 80)

[05] – Setting Mikrotik Blok Situs HTTP (Port 80)

Cara Setting Mikrotik Sebagai Router DHCP, Hotspot, dan Blokir Situs HTTP (Port Web 80) menggunakan Web Proxy

 

Soal :

  1. IP internet 192.168.200.xx/24
  2. Gateway 192.168.200.1
  3. IP LAN 192.168.10.1/28
  4. IP WLAN 192.168.20.1/27
  5. Buat DHCP LAN
  6. Buat Hotspot
  7. Blokir Situs HTTP di LAN

 

Langkah Konfigurasi :

Setting Nama Router

[admin@Mikrotik] system identity set name=BBEC            → Enter

 

Setting Interface

[admin@BBEC] interface print          → Enter

[admin@BBEC] interface set ether1 name=WAN_eth1       → Enter

[admin@BBEC] interface set ether2 name=LAN_eth2        → Enter

[admin@BBEC] interface set wlan1 name=WIFI_wlan1     → Enter

[admin@BBEC] interface print          → Enter

 

Setting IP

[admin@BBEC] ip address add address=192.168.200.xx/24 interface=WAN_eth1 → Enter

[admin@BBEC] ip address add address=192.168.10.1/28 interface=LAN_eth2    → Enter

[admin@BBEC] ip address add address=192.168.20.1/27 interface= WIFI_wlan1            → Enter

[admin@BBEC] ip address print       → Enter

 

Setting DNS

[admin@BBEC] ip dns set server=1.1.1.1,8.8.8.8 allow-remote-request=yes           → Enter

[admin@BBEC] ip dns print  → Enter

 

Setting Gateway

[admin@BBEC] ip route add gateway=192.168.200.1         → Enter

[admin@BBEC] ip route print           → Enter

 

Test Koneksi

[admin@BBEC] ping 1.1.1.1 → Enter

 

Setting Firewall NAT

[admin@BBEC] ip firewall nat add chain=srcnat action=masquerade out-interface=WAN_eth1   → Enter

[admin@BBEC] ip firewall nat print → Enter

 

Setting DHCP Server LAN 

[admin@BBEC] ip dhcp-server setup            → Enter

Select interface to run DHCP server on

dhcp server interface: LAN_eth2       → Enter

Select network for DHCP addresses

Dhcp address space : 192.168.10.0/28           → Enter

Select gateway for given network

gateway for dhcp network : 192.168.10.1      → Enter

Select pool of ip address given out by DHCP server

Addresses to give out : 192.168.10.2-192.168.10.14 → Enter

Select DNS servers

dns servers : 1.1.1.1,8.8.8.8    → Enter

Select lease time

lease time : 10m          → Enter

[admin@BBEC] ip dhcp-server print  → Enter

 

Setting WIFI Access Point

[admin@BBEC] interface wireless set WIFI_wlan1 mode=ap-bridge band=2ghz-b/g/n frequency=2412 ssid=”NAMAKAMU” disabled=no

 

Setting Hotspot

[admin@BBEC] ip hotspot setup    → Enter

hotspot interfaces : WIFI_wlan1        → Enter

local address of network : 192.168.20.1/27    → Enter

masquerade network : no    → Enter

address pool of network : 192.168.20.2-192.168.20.30    → Enter

select certificate : none    → Enter

ip address of smtp server : 0.0.0.0    → Enter

dns servers : 1.1.1.1,8.8.8.8    → Enter

dns name : bbecpringsewu.sch.id    → Enter

name of local hotspot user : admin    → Enter

password for the user : admin    → Enter

[admin@BBEC] ip hotspot profile set hsprof1 login-by=http-chap     → Enter

[admin@BBEC] ip hotspot user profile add name=guru shared-users=5 rate-limit=1024k/1024k add-mac-cookie=no    → Enter

[admin@BBEC] ip hotspot user profile add name=siswa shared-users=15 rate-limit=512k/512k add-mac-cookie=no    → Enter

[admin@BBEC] ip hotspot user add server=hotspot1 name=guru password=guru profile=guru    → Enter

[admin@BBEC] ip hotspot user add server=hotspot1 name=siswa password=siswa profile=siswa    → Enter

 

Setting Web Proxy

[admin@BBEC] ip proxy set enabled=yes port=3128 cache-administrator=emailkamu

[admin@BBEC] ip proxy access add dst-host=mikrotik.co.id action=deny

 

Setting Firewall NAT untuk Redirect ke Proxy

[admin@BBEC] ip firewall nat add chain=dstnat protocol=tcp dst-port=80 in-interface=LAN_eth2 action=redirect to-ports=3128    → Enter

[admin@BBEC] ip firewall nat print → Enter

 

Test Hotspot

  1. Silahkan Koneksikan ke WiFi yang sudah di buat
  2. Buka Firefox / Chrome, ketikkan bbecpringsewu.sch.id
  3. Login dengan salah satu user

Test Blokir Situs

  1. Konekan LAN ke komputer
  2. Setting IP address di komputer menjadi DHCP
  3. Buka situs mikrotik.co.id dari komputer

 

About haikars

Check Also

[01] Konfigurasi Dasar Mikrotik Router via CLI

Cara Setting Mikrotik Dasar Via CLI   Ex :      IP internet 192.168.200.1/24 IP LAN …

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *