Home / Mikrotik / [04 ] Konfigurasi Mikrotik Sebagai Router Hotspot Via CLI

[04 ] Konfigurasi Mikrotik Sebagai Router Hotspot Via CLI

Cara Setting Mikrotik Sebagai Router Hotspot

 

Ex :      IP internet 192.168.200.1/24

IP LAN 192.168.10.1/28

IP WLAN 192.168.20.1/27

 

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

 

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

 

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

 

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 *