HOTSPOT SEDERHANA ala MIkROTIK

topologi2.jpg

/ interface ethernet
set ether1 name=”intranet”
set ether2 name=”internet”
set ether3 name=”serverlc”

/ ip address
add address=192.168.17.17/24 network=192.168.17.0 broadcast=192.168.17.255 interface=intranet comment=”dhcp-pool” disabled=no
add address=182.18.13.100/25 network=182.18.8.0 broadcast=182.18.15.255 interface=intranet comment=”” disabled=no
add address=10.10.10.6/29 network=10.10.10.0 broadcast=10.10.10.7 interface=serverlc comment=”” disabled=no
/ ip dhcp-client
add interface=internet add-default-route=yes use-peer-dns=yes use-peer-ntp=yes comment=”” disabled=no
/ ip pool
add name=”dhcppool” ranges=192.168.17.1-192.168.17.16,192.168.17.18-192.168.17.254
add name=”12-profs” ranges=182.18.13.1-182.18.13.32

/ ip firewall nat
add chain=srcnat out-interface=internet action=masquerade comment=”masquerade hotspot network” disabled=no
/ ip firewall connection tracking
set enabled=yes tcp-syn-sent-timeout=5s tcp-syn-received-timeout=5s tcp-established-timeout=1d tcp-fin-wait-timeout=10s tcp-close-wait-timeout=10s \
tcp-last-ack-timeout=10s tcp-time-wait-timeout=10s tcp-close-timeout=10s udp-timeout=10s udp-stream-timeout=3m icmp-timeout=10s generic-timeout=10m \
tcp-syncookie=no

/ ip dhcp-server
add name=”dhcp1″ interface=intranet lease-time=1h address-pool=dhcppool bootp-support=static add-arp=yes authoritative=after-2sec-delay disabled=no
/ ip dhcp-server config
set store-leases-disk=5m

/ ip dhcp-server network
add address=192.168.17.0/24 gateway=192.168.17.17 comment=”hotspot network”
/ ip ipsec proposal
add name=”default” auth-algorithms=sha1 enc-algorithms=3des lifetime=30m lifebytes=0 pfs-group=modp1024 disabled=no

/ ip hotspot profile
add name=”hsprof1″ hotspot-address=192.168.17.17 dns-name=”netsol.koran” html-directory=hotspot rate-limit=”” http-proxy=10.10.10.1:3128 smtp-server=0.0.0.0 \
login-by=cookie,http-chap http-cookie-lifetime=3d split-user-domain=no use-radius=no
/ ip hotspot user profile
set default name=”default” keepalive-timeout=2m status-autorefresh=1m shared-users=1 transparent-proxy=yes open-status-page=always advertise=no
add name=”12-profs” address-pool=12-profs keepalive-timeout=2m status-autorefresh=1m shared-users=1 transparent-proxy=no

/ ip hotspot
add name=”hotspot1″ interface=intranet address-pool=dhcppool profile=hsprof1 idle-timeout=5m keepalive-timeout=none addresses-per-mac=1 disabled=no

/ ip hotspot user
add server=hotspot1 name=”admin1″ password=”” profile=12-profs comment=”” disabled=no
add server=hotspot1 name=”admin2″ password=”” profile=12-profs comment=”” disabled=no

/ ip hotspot walled-garden
add server=hotspot1 dst-host=www.netsolngawi.com action=allow comment=”” disabled=no

/ ip firewall mangle
add chain=prerouting in-interface=intranet src-address=182.18.13.1 action=mark-packet new-packet-mark=12-profs-up-01 passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.2 action=mark-packet new-packet-mark=12-profs-up-01 passthrough=no comment=”” disabled=no
add chain=forward src-address=182.18.13.1 action=mark-connection new-connection-mark=12-profs-cm-01 passthrough=yes comment=”” disabled=no
add chain=forward src-address=182.18.13.2 action=mark-connection new-connection-mark=12-profs-cm-01 passthrough=yes comment=”” disabled=no
add chain=forward in-interface=internet connection-mark=12-profs-cm-01 action=mark-packet new-packet-mark=12-profs-dw-01 passthrough=no comment=”” \
disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.3 action=mark-packet new-packet-mark=12-profs-up-02 passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.4 action=mark-packet new-packet-mark=12-profs-up-02 passthrough=no comment=”” disabled=no
add chain=forward src-address=182.18.13.3 action=mark-connection new-connection-mark=12-profs-cm-02 passthrough=yes comment=”” disabled=no
add chain=forward src-address=182.18.13.4 action=mark-connection new-connection-mark=12-profs-cm-02 passthrough=yes comment=”” disabled=no
add chain=forward in-interface=internet connection-mark=12-profs-cm-02 action=mark-packet new-packet-mark=12-profs-dw-02 passthrough=no comment=”” \
disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.5 action=mark-packet new-packet-mark=12-profs-up-03 passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.6 action=mark-packet new-packet-mark=12-profs-up-03 passthrough=no comment=”” disabled=no
add chain=forward src-address=182.18.13.5 action=mark-connection new-connection-mark=12-profs-cm-03 passthrough=yes comment=”” disabled=no
add chain=forward src-address=182.18.13.6 action=mark-connection new-connection-mark=12-profs-cm-03 passthrough=yes comment=”” disabled=no
add chain=forward in-interface=internet connection-mark=12-profs-cm-03 action=mark-packet new-packet-mark=12-profs-dw-03 passthrough=no comment=”” \
disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.7 action=mark-packet new-packet-mark=12-profs-up-04 passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.8 action=mark-packet new-packet-mark=12-profs-up-04 passthrough=no comment=”” disabled=no
add chain=forward src-address=182.18.13.7 action=mark-connection new-connection-mark=12-profs-cm-04 passthrough=yes comment=”” disabled=no
add chain=forward src-address=182.18.13.8 action=mark-connection new-connection-mark=12-profs-cm-04 passthrough=yes comment=”” disabled=no
add chain=forward in-interface=internet connection-mark=12-profs-cm-04 action=mark-packet new-packet-mark=12-profs-dw-04 passthrough=no comment=”” \
disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.9 action=mark-packet new-packet-mark=12-profs-up-05 passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.10 action=mark-packet new-packet-mark=12-profs-up-05 passthrough=no comment=”” disabled=no
add chain=forward src-address=182.18.13.9 action=mark-connection new-connection-mark=12-profs-cm-05 passthrough=yes comment=”” disabled=no
add chain=forward src-address=182.18.13.10 action=mark-connection new-connection-mark=12-profs-cm-05 passthrough=yes comment=”” disabled=no
add chain=forward in-interface=internet connection-mark=12-profs-cm-05 action=mark-packet new-packet-mark=12-profs-dw-05 passthrough=no comment=”” \
disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.11 action=mark-packet new-packet-mark=12-profs-up-06 passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.12 action=mark-packet new-packet-mark=12-profs-up-06 passthrough=no comment=”” disabled=no
add chain=forward src-address=182.18.13.11 action=mark-connection new-connection-mark=12-profs-cm-06 passthrough=yes comment=”” disabled=no
add chain=forward src-address=182.18.13.12 action=mark-connection new-connection-mark=12-profs-cm-06 passthrough=yes comment=”” disabled=no
add chain=forward in-interface=internet connection-mark=12-profs-cm-06 action=mark-packet new-packet-mark=12-profs-dw-06 passthrough=no comment=”” \
disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.13 action=mark-packet new-packet-mark=12-profs-up-07 passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.14 action=mark-packet new-packet-mark=12-profs-up-07 passthrough=no comment=”” disabled=no
add chain=forward src-address=182.18.13.13 action=mark-connection new-connection-mark=12-profs-cm-07 passthrough=yes comment=”” disabled=no
add chain=forward src-address=182.18.13.14 action=mark-connection new-connection-mark=12-profs-cm-07 passthrough=yes comment=”” disabled=no
add chain=forward in-interface=internet connection-mark=12-profs-cm-07 action=mark-packet new-packet-mark=12-profs-dw-07 passthrough=no comment=”” \
disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.15 action=mark-packet new-packet-mark=12-profs-up-08 passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.16 action=mark-packet new-packet-mark=12-profs-up-08 passthrough=no comment=”” disabled=no
add chain=forward src-address=182.18.13.15 action=mark-connection new-connection-mark=12-profs-cm-08 passthrough=yes comment=”” disabled=no
add chain=forward src-address=182.18.13.16 action=mark-connection new-connection-mark=12-profs-cm-08 passthrough=yes comment=”” disabled=no
add chain=forward in-interface=internet connection-mark=12-profs-cm-08 action=mark-packet new-packet-mark=12-profs-dw-08 passthrough=no comment=”” \
disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.17 action=mark-packet new-packet-mark=12-profs-up-09 passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.18 action=mark-packet new-packet-mark=12-profs-up-09 passthrough=no comment=”” disabled=no
add chain=forward src-address=182.18.13.17 action=mark-connection new-connection-mark=12-profs-cm-09 passthrough=yes comment=”” disabled=no
add chain=forward src-address=182.18.13.18 action=mark-connection new-connection-mark=12-profs-cm-09 passthrough=yes comment=”” disabled=no
add chain=forward in-interface=internet connection-mark=12-profs-cm-09 action=mark-packet new-packet-mark=12-profs-dw-09 passthrough=no comment=”” \
disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.19 action=mark-packet new-packet-mark=12-profs-up-10 passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.20 action=mark-packet new-packet-mark=12-profs-up-10 passthrough=no comment=”” disabled=no
add chain=forward src-address=182.18.13.19 action=mark-connection new-connection-mark=12-profs-cm-10 passthrough=yes comment=”” disabled=no
add chain=forward src-address=182.18.13.20 action=mark-connection new-connection-mark=12-profs-cm-10 passthrough=yes comment=”” disabled=no
add chain=forward in-interface=internet connection-mark=12-profs-cm-10 action=mark-packet new-packet-mark=12-profs-dw-10 passthrough=no comment=”” \
disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.21 action=mark-packet new-packet-mark=12-profs-up-11 passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.22 action=mark-packet new-packet-mark=12-profs-up-11 passthrough=no comment=”” disabled=no
add chain=forward src-address=182.18.13.21 action=mark-connection new-connection-mark=12-profs-cm-11 passthrough=yes comment=”” disabled=no
add chain=forward src-address=182.18.13.22 action=mark-connection new-connection-mark=12-profs-cm-11 passthrough=yes comment=”” disabled=no
add chain=forward in-interface=internet connection-mark=12-profs-cm-11 action=mark-packet new-packet-mark=12-profs-dw-11 passthrough=no comment=”” \
disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.23 action=mark-packet new-packet-mark=12-profs-up-12 passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.24 action=mark-packet new-packet-mark=12-profs-up-12 passthrough=no comment=”” disabled=no
add chain=forward src-address=182.18.13.23 action=mark-connection new-connection-mark=12-profs-cm-12 passthrough=yes comment=”” disabled=no
add chain=forward src-address=182.18.13.24 action=mark-connection new-connection-mark=12-profs-cm-12 passthrough=yes comment=”” disabled=no
add chain=forward in-interface=internet connection-mark=12-profs-cm-12 action=mark-packet new-packet-mark=12-profs-dw-12 passthrough=no comment=”” \
disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.25 action=mark-packet new-packet-mark=12-profs-up-13 passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.26 action=mark-packet new-packet-mark=12-profs-up-13 passthrough=no comment=”” disabled=no
add chain=forward src-address=182.18.13.25 action=mark-connection new-connection-mark=12-profs-cm-13 passthrough=yes comment=”” disabled=no
add chain=forward src-address=182.18.13.26 action=mark-connection new-connection-mark=12-profs-cm-13 passthrough=yes comment=”” disabled=no
add chain=forward in-interface=internet connection-mark=12-profs-cm-13 action=mark-packet new-packet-mark=12-profs-dw-13 passthrough=no comment=”” \
disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.27 action=mark-packet new-packet-mark=12-profs-up-14 passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.28 action=mark-packet new-packet-mark=12-profs-up-14 passthrough=no comment=”” disabled=no
add chain=forward src-address=182.18.13.27 action=mark-connection new-connection-mark=12-profs-cm-14 passthrough=yes comment=”” disabled=no
add chain=forward src-address=182.18.13.28 action=mark-connection new-connection-mark=12-profs-cm-14 passthrough=yes comment=”” disabled=no
add chain=forward in-interface=internet connection-mark=12-profs-cm-14 action=mark-packet new-packet-mark=12-profs-dw-14 passthrough=no comment=”” \
disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.29 action=mark-packet new-packet-mark=12-profs-up-15 passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.30 action=mark-packet new-packet-mark=12-profs-up-15 passthrough=no comment=”” disabled=no
add chain=forward src-address=182.18.13.29 action=mark-connection new-connection-mark=12-profs-cm-15 passthrough=yes comment=”” disabled=no
add chain=forward src-address=182.18.13.30 action=mark-connection new-connection-mark=12-profs-cm-15 passthrough=yes comment=”” disabled=no
add chain=forward in-interface=internet connection-mark=12-profs-cm-15 action=mark-packet new-packet-mark=12-profs-dw-15 passthrough=no comment=”” \
disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.31 action=mark-packet new-packet-mark=12-profs-up-16 passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=intranet src-address=182.18.13.32 action=mark-packet new-packet-mark=12-profs-up-16 passthrough=no comment=”” disabled=no
add chain=forward src-address=182.18.13.31 action=mark-connection new-connection-mark=12-profs-cm-16 passthrough=yes comment=”” disabled=no
add chain=forward src-address=182.18.13.32 action=mark-connection new-connection-mark=12-profs-cm-16 passthrough=yes comment=”” disabled=no
add chain=forward in-interface=internet connection-mark=12-profs-cm-16 action=mark-packet new-packet-mark=12-profs-dw-16 passthrough=no comment=”” \
disabled=no

/ system identity
set name=”router.hotspot”
/ queue type
add name=”dw-pcq” kind=pcq pcq-rate=0 pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=2000
add name=”up-pcq” kind=pcq pcq-rate=0 pcq-limit=50 pcq-classifier=src-address pcq-total-limit=2000
/ queue simple
/ queue tree
add name=”dwload” parent=intranet packet-mark=”” limit-at=0 queue=default priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no
add name=”upload” parent=global-in packet-mark=”” limit-at=0 queue=default priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s disabled=no
add name=”dw-12-profs-01″ parent=dwload packet-mark=12-profs-dw-01 limit-at=0 queue=dw-pcq priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”up-12-profs-01″ parent=upload packet-mark=12-profs-up-01 limit-at=0 queue=up-pcq priority=8 max-limit=32000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”dw-12-profs-02″ parent=dwload packet-mark=12-profs-dw-02 limit-at=0 queue=dw-pcq priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”up-12-profs-02″ parent=upload packet-mark=12-profs-up-02 limit-at=0 queue=up-pcq priority=8 max-limit=32000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”dw-12-profs-03″ parent=dwload packet-mark=12-profs-dw-03 limit-at=0 queue=dw-pcq priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”up-12-profs-03″ parent=upload packet-mark=12-profs-up-03 limit-at=0 queue=up-pcq priority=8 max-limit=32000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”dw-12-profs-04″ parent=dwload packet-mark=12-profs-dw-04 limit-at=0 queue=dw-pcq priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”up-12-profs-04″ parent=upload packet-mark=12-profs-up-04 limit-at=0 queue=up-pcq priority=8 max-limit=32000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”dw-12-profs-05″ parent=dwload packet-mark=12-profs-dw-05 limit-at=0 queue=dw-pcq priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”up-12-profs-05″ parent=upload packet-mark=12-profs-up-05 limit-at=0 queue=up-pcq priority=8 max-limit=32000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”dw-12-profs-06″ parent=dwload packet-mark=12-profs-dw-06 limit-at=0 queue=dw-pcq priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”dw-12-profs-07″ parent=dwload packet-mark=12-profs-dw-07 limit-at=0 queue=dw-pcq priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”up-12-profs-07″ parent=upload packet-mark=12-profs-up-07 limit-at=0 queue=up-pcq priority=8 max-limit=32000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”dw-12-profs-08″ parent=dwload packet-mark=12-profs-dw-08 limit-at=0 queue=dw-pcq priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”up-12-profs-08″ parent=upload packet-mark=12-profs-up-08 limit-at=0 queue=up-pcq priority=8 max-limit=32000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”dw-12-profs-09″ parent=dwload packet-mark=12-profs-dw-09 limit-at=0 queue=dw-pcq priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”up-12-profs-09″ parent=upload packet-mark=12-profs-up-09 limit-at=0 queue=up-pcq priority=8 max-limit=32000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”dw-12-profs-10″ parent=dwload packet-mark=12-profs-dw-10 limit-at=0 queue=dw-pcq priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”up-12-profs-10″ parent=upload packet-mark=12-profs-up-10 limit-at=0 queue=up-pcq priority=8 max-limit=32000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”dw-12-profs-11″ parent=dwload packet-mark=12-profs-dw-11 limit-at=0 queue=dw-pcq priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”up-12-profs-11″ parent=upload packet-mark=12-profs-up-11 limit-at=0 queue=up-pcq priority=8 max-limit=32000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”dw-12-profs-12″ parent=dwload packet-mark=12-profs-dw-12 limit-at=0 queue=dw-pcq priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”up-12-profs-12″ parent=upload packet-mark=12-profs-up-12 limit-at=0 queue=up-pcq priority=8 max-limit=32000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”dw-12-profs-13″ parent=dwload packet-mark=12-profs-dw-13 limit-at=0 queue=dw-pcq priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”up-12-profs-13″ parent=upload packet-mark=12-profs-up-13 limit-at=0 queue=up-pcq priority=8 max-limit=32000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”dw-12-profs-14″ parent=dwload packet-mark=12-profs-dw-14 limit-at=0 queue=dw-pcq priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”up-12-profs-14″ parent=upload packet-mark=12-profs-up-14 limit-at=0 queue=up-pcq priority=8 max-limit=32000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”dw-12-profs-15″ parent=dwload packet-mark=12-profs-dw-15 limit-at=0 queue=dw-pcq priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”up-12-profs-15″ parent=upload packet-mark=12-profs-up-15 limit-at=0 queue=up-pcq priority=8 max-limit=32000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”dw-12-profs-16″ parent=dwload packet-mark=12-profs-dw-16 limit-at=0 queue=dw-pcq priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name=”up-12-profs-16″ parent=upload packet-mark=12-profs-up-16 limit-at=0 queue=up-pcq priority=8 max-limit=32000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no

You may also like

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *