Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

/interface wireless

set [ find default-name=wlan1 ] band=2ghz-b/g/n disabled=no mode=ap-bridge \

    ssid=megakarya_wifi

/interface ethernet

set [ find default-name=ether1 ] name=ISP

set [ find default-name=ether2 ] name=PC-CCTV

set [ find default-name=ether4 ] name=Server-PPPoE

/interface wireless security-profiles

set [ find default=yes ] supplicant-identity=MikroTik

/ip hotspot profile

add dns-name=megakarya_wifi hotspot-address=192.168.3.1 login-by=\

    http-chap,http-pap,trial name=hsprof1

/ip pool

add name=dhcp_pool1 ranges=192.168.2.2-192.168.2.254

add name=PPPoE-pool ranges=192.168.4.2-192.168.4.254

add name=hs-pool-7 ranges=192.168.3.2-192.168.3.254

add name=dhcp_pool4 ranges=192.168.3.2-192.168.3.254

/ip dhcp-server

add address-pool=dhcp_pool1 disabled=no interface=PC-CCTV name=dhcp2

add address-pool=dhcp_pool4 disabled=no interface=ether3 name=dhcp1

/ip hotspot

add address-pool=hs-pool-7 disabled=no interface=ether3 name=\

    hotspot1 profile=hsprof1

/ppp profile

add local-address=192.168.4.1 name=profile1 rate-limit=2m/2m remote-address=\

    PPPoE-pool

/interface pppoe-server server

add disabled=no interface=Server-PPPoE service-name=service1

/ip address

add address=192.168.2.1/24 interface=PC-CCTV network=192.168.2.0


add address=192.168.4.1/24 interface=Server-PPPoE network=192.168.4.0

add address=192.168.3.1/24 interface=ether3 network=192.168.3.0

/ip dhcp-client

add disabled=no interface=ISP

/ip dhcp-server network

add address=10.5.50.0/24 comment="hotspot network" gateway=10.5.50.1

add address=192.168.2.0/24 gateway=192.168.2.1

add address=192.168.3.0/24 comment="hotspot network" gateway=192.168.3.1

/ip dns

set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4

/ip firewall filter

add action=passthrough chain=unused-hs-chain comment=\

    "place hotspot rules here" disabled=yes

/ip firewall nat

add action=passthrough chain=unused-hs-chain comment=\

    "place hotspot rules here" disabled=yes

add action=masquerade chain=srcnat out-interface=ISP

add action=masquerade chain=srcnat comment="masquerade hotspot network" \

    src-address=10.5.50.0/24

add action=masquerade chain=srcnat comment="masquerade hotspot network" \

    src-address=192.168.3.0/24

/ip hotspot user

add name=admin

/ppp secret

add name=Neicy password=tekno profile=profile1 service=pppoe

/system clock

set time-zone-name=Asia/Jakarta

You might also like