You are on page 1of 3

# Router OS Script, built on version 5.

26
# Script By RNet
# Just paste on Terminal and Go
# Login via Winbox: User = admin password (blank)
# User/password hotspot login can be seen in the script
# Already pre-installed some profiles on User Manager & PPP server

/interface pppoe-client
add add-default-route=yes interface=ether1 name=pppoe-out1 password=444 \
use-peer-dns=yes user=ppp4
/ip hotspot profile
add dns-name=rnet.rtrw hotspot-address=172.31.146.1 html-directory=RNet \
login-by=http-chap name=hsprof1 use-radius=yes
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m
add idle-timeout=none keepalive-timeout=2m name=profile#256 rate-limit=\
"64k/256k 128k/512k 50k/192k 25/25 7 50k/50k"
add idle-timeout=none keepalive-timeout=2m name=profile#128 rate-limit=\
"64k/128k 80k/512k 40k/90k 30/30 7 50k/50k"
add idle-timeout=none keepalive-timeout=2m name=profile#512 rate-limit=\
"128k/512k 256k/1024k 50k/192k 20/20 7 50k/50k"
add idle-timeout=none keepalive-timeout=2m name=profile@256 rate-limit=\
96k/256k
add idle-timeout=none keepalive-timeout=2m name=profile@128 rate-limit=\
64k/128k
add idle-timeout=none keepalive-timeout=2m name=uprof@512 rate-limit=\
128k/512k
add idle-timeout=none keepalive-timeout=2m name=profile@1024 rate-limit=\
512k/1024k transparent-proxy=yes
/ip pool
add name=hs-pool-2 ranges=172.31.146.20-172.31.146.200
add name=ppp ranges=10.0.0.20-10.0.0.250
/ip dhcp-server
add address-pool=hs-pool-2 disabled=no interface=ether2 lease-time=1h name=\
dhcp1
/ip hotspot
add address-pool=hs-pool-2 disabled=no interface=ether2 name=hotspot1 \
profile=hsprof1
/ppp profile
set 0 local-address=hs-pool-2 remote-address=ppp
add idle-timeout=0s local-address=ppp name=profile#256 only-one=yes \
rate-limit="64k/256k 128k/512k 50k/192k 25/25 7 50k/50k"
add local-address=ppp name=profile#128 only-one=yes rate-limit=\
"64k/128k 80k/512k 40k/90k 30/30 7 50k/50k"
add local-address=ppp name=profile#512 only-one=yes rate-limit=\
"128k/512k 256k/1024k 50k/192k 20/20 7 50k/50k"
add local-address=ppp name=profile@128 only-one=yes rate-limit=64k/128k
add local-address=ppp name=profile@256 only-one=yes rate-limit=96k/256k
add local-address=ppp name=profile@512 only-one=yes rate-limit=128k/512k
add local-address=ppp name=profile@1024 only-one=yes rate-limit=256k/1024k
/tool user-manager customer
add backup-allowed=yes disabled=no login=admin password="" \
paypal-accept-pending=no paypal-allowed=no paypal-secure-response=no \
permissions=owner signup-allowed=no time-zone=-00:00
/tool user-manager profile limitation
add address-list="" download-limit=0B group-name="" ip-pool="" name=limit-512 \
rate-limit-burst-rx=204800B rate-limit-burst-time-rx=20s \
rate-limit-burst-time-tx=20s rate-limit-burst-treshold-rx=81920B \
rate-limit-burst-treshold-tx=358400B rate-limit-burst-tx=819200B \
rate-limit-min-rx=51200B rate-limit-min-tx=61440B rate-limit-priority=7 \
rate-limit-rx=102400B rate-limit-tx=512000B transfer-limit=0B \
upload-limit=0B uptime-limit=0s
add address-list="" download-limit=0B group-name="" ip-pool="" name=limit-256 \
rate-limit-burst-rx=102400B rate-limit-burst-time-rx=30s \
rate-limit-burst-time-tx=30s rate-limit-burst-treshold-rx=51200B \
rate-limit-burst-treshold-tx=194560B rate-limit-burst-tx=512000B \
rate-limit-min-rx=40960B rate-limit-min-tx=61440B rate-limit-priority=7 \
rate-limit-rx=61440B rate-limit-tx=256000B transfer-limit=0B \
upload-limit=0B uptime-limit=4w2d
add address-list="" download-limit=0B group-name="" ip-pool="" name=limit-128 \
rate-limit-burst-rx=81920B rate-limit-burst-time-rx=30s \
rate-limit-burst-time-tx=30s rate-limit-burst-treshold-rx=40960B \
rate-limit-burst-treshold-tx=92160B rate-limit-burst-tx=524288B \
rate-limit-min-rx=40960B rate-limit-min-tx=51200B rate-limit-priority=7 \
rate-limit-rx=65536B rate-limit-tx=131072B transfer-limit=0B \
upload-limit=0B uptime-limit=0s
/interface pppoe-server server
add disabled=no interface=ether2 service-name=service1
/ip address
add address=172.31.146.1/24 interface=ether2
/ip dhcp-client
add default-route-distance=0 disabled=no interface=ether1
/ip dhcp-server network
add address=172.31.146.0/24 comment="hotspot network" gateway=172.31.146.1
/ip dns
set max-udp-packet-size=512 servers=192.168.1.1,203.130.193.74
/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 comment="masquerade hotspot network" \
src-address=172.31.146.0/24
add action=masquerade chain=srcnat src-address=10.0.0.0/24
/ip hotspot user
add name=admin password=master
add name=user1 password=111 profile=profile#128
add name=user2 password=222 profile=profile#256
add name=user3 password=333 profile=profile#512
add name=user4 password=444 profile=profile@1024
/ip proxy
set max-cache-size=none
/ip service
set www port=81
set ssh disabled=yes
/ppp aaa
set use-radius=yes
/ppp secret
add name=ppp password=111
add name=ppp1 password=111 profile=profile#128
add name=ppp2 password=222 profile=profile#256
add name=ppp3 password=333 profile=profile#512
add name=ppp4 password=444 profile=profile@1024
/radius
add address=127.0.0.1 secret=1 service=ppp,hotspot
/snmp
set trap-target=0.0.0.0
/system clock
set time-zone-name=Asia/Jakarta
/system logging
add topics=info
add topics=error
add topics=warning
add action=echo topics=critical
add topics=info
add topics=error
add topics=warning
add action=echo topics=critical
add topics=info
add topics=error
add topics=warning
add action=echo topics=critical
add topics=info
add topics=error
add topics=warning
add action=echo topics=critical
/system ntp client
set enabled=yes primary-ntp=140.112.2.189 secondary-ntp=203.160.128.3
/tool user-manager router
add coa-port=1700 customer=admin disabled=yes ip-address=192.168.1.2 log=\
auth-fail name=router1 shared-secret="" use-coa=no
add coa-port=1700 customer=admin disabled=no ip-address=127.0.0.1 log="" \
name=radius shared-secret=1 use-coa=no
/tool user-manager user
add customer=admin disabled=no name=radius password=radius shared-users=1 \
wireless-enc-algo=none wireless-enc-key="" wireless-psk=""
add customer=admin disabled=no name=usman password=000 shared-users=1 \
wireless-enc-algo=none wireless-enc-key="" wireless-psk=""
add customer=admin disabled=no name=usman1 password=111 shared-users=1 \
wireless-enc-algo=none wireless-enc-key="" wireless-psk=""
add customer=admin disabled=no name=usman2 password=222 shared-users=1 \
wireless-enc-algo=none wireless-enc-key="" wireless-psk=""
add customer=admin disabled=no name=usman3 password=333 shared-users=1 \
wireless-enc-algo=none wireless-enc-key="" wireless-psk=""