You are on page 1of 2

/interface set ether2 name=WAN1

/interface set ether3 name=WAN2


/interface set ether4 name=HOTSPOT1
/interface set ether4 name=HOTSPOT2
/ip address
add address=190.79.8.1/24 network=190.79.8.0 broadcast=190.79.8.255 interface=HO
TSPOT1
add address=190.79.7.1/24 network=190.79.7.0 broadcast=190.79.7.255 interface=HO
TSPOT2
add address=200.4.2.11/24 network=200.4.2.0 broadcast=200.4.2.255 interface=WAN1
add address=192.168.169.2/24 network=192.168.169.0 broadcast=192.168.169.255 int
erface=WAN2
/ip dns set allow-remote-requests=yes cache-max-ttl=1w cache-size=5000KiB max-ud
p-packet-size=512 servers=190.79.8.1,8.8.8.8,8.8.4.4
/ip firewall mangle
add chain=input in-interface=WAN1 action=mark-connection new-connection-mark=WAN
1_conn
add chain=input in-interface=WAN2 action=mark-connection new-connection-mark=WAN
2_conn
/ip firewall mangle
add chain=output connection-mark=WAN1_conn action=mark-routing new-routing-mark=
to_WAN1
add chain=output connection-mark=WAN2_conn action=mark-routing new-routing-mark=
to_WAN2
/ip firewall mangle
add chain=prerouting dst-address=200.4.2.0/24 action=accept in-interface=HOTSPOT
1
add chain=prerouting dst-address=192.168.169.0/24 action=accept in-interface=HOT
SPOT1
add chain=prerouting dst-address=200.4.2.0/24 action=accept in-interface=HOTSPOT
2
add chain=prerouting dst-address=192.168.169.0/24 action=accept in-interface=HOT
SPOT2
/ip firewall mangle
add chain=prerouting dst-address-type=!local hotspot=auth in-interface=HOTSPOT1
per-connection-classifier=both-addresses-and-ports:2/0 action=mark-connection ne
w-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local hotspot=auth in-interface=HOTSPOT1
per-connection-classifier=both-addresses-and-ports:2/1 action=mark-connection ne
w-connection-mark=WAN2_conn passthrough=yes
add chain=prerouting dst-address-type=!local hotspot=auth in-interface=HOTSPOT2
per-connection-classifier=both-addresses-and-ports:2/0 action=mark-connection ne
w-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local hotspot=auth in-interface=HOTSPOT2
per-connection-classifier=both-addresses-and-ports:2/1 action=mark-connection ne
w-connection-mark=WAN2_conn passthrough=yes
/ip firewall mangle
add chain=prerouting connection-mark=WAN1_conn in-interface=HOTSPOT1 action=mark
-routing new-routing-mark=to_WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=HOTSPOT1 action=mark
-routing new-routing-mark=to_WAN2
add chain=prerouting connection-mark=WAN1_conn in-interface=HOTSPOT2 action=mark
-routing new-routing-mark=to_WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=HOTSPOT2 action=mark
-routing new-routing-mark=to_WAN2
/ip route
add dst-address=0.0.0.0/0 gateway=200.4.2.11 routing-mark=to_WAN1 check-gateway=
ping
add dst-address=0.0.0.0/0 gateway=192.168.169.2 routing-mark=to_WAN2 check-gatew

ay=ping
/ip route
add dst-address=0.0.0.0/0 gateway=200.4.2.11 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.169.2 distance=2 check-gateway=ping
/ip firewall nat
add chain=srcnat out-interface=WAN1 action=masquerade
add chain=srcnat out-interface=WAN2 action=masquerade
/ip address
add address=190.79.8.1/24 disabled=no interface=HOTSPOT1 network=190.79.8.0
add address=190.79.7.1/24 disabled=no interface=HOTSPOT2 network=190.79.7.0
/ip pool
add name=hs-pool-1 ranges=190.79.7.10-190.79.8.200
/ip dhcp-server
add address-pool=hs-pool-1 authoritative=after-2sec-delay bootp-support=static d
isabled=no interface=HOTSPOT1 lease-time=1h name=dhcp1
add address-pool=hs-pool-2 authoritative=after-2sec-delay bootp-support=static d
isabled=no interface=HOTSPOT2 lease-time=1h name=dhcp2
/ip dhcp-server config set store-leases-disk=5m
/ip dhcp-server network
add address=190.79.8.0/24 comment= hotspot network gateway=190.79.8.1
add address=190.79.7.0/24 comment= hotspot network gateway=190.79.7.1
/ip hotspot profile
set default dns-name= " hotspot-address=0.0.0.0 html-directory=hotspot http-cookie
-lifetime=3d http-proxy=0.0.0.0:0 login-by=http-chap name=default rate-limit= " sm
tp-server=0.0.0.0 split-user-domain=no use-radius=no
add dns-name=travosh.com hotspot-address=190.79.8.1 html-directory=hotspot httpcookie-lifetime=1d http-proxy=0.0.0.0:0 login-by=http-chap name=hsprof1 rate-lim
it= " smtp-server=0.0.0.0 split-user-domain=no use-radius=no
/ip hotspot
add address-pool=hs-pool-1 addresses-per-mac=1 disabled=no idle-timeout=15m inte
rface=HOTSPOT1 keepalive-timeout=none name=HOTSPOT profile=hsprof1
/ip hotspot user profile
set default idle-timeout=15m keepalive-timeout=2m name=default shared-users=1 st
atus-autorefresh=1m transparent-proxy=no
add address-pool=hs-pool-1 advertise=no idle-timeout=none keepalive-timeout=2m n
ame= 512k Limit open-status-page=always rate-limit=512k/512k shared-users=1 statusautorefresh=1m transparent-proxy=yes
add address-pool=hs-pool-1 advertise=no idle-timeout=none keepalive-timeout=2m n
ame= 256k Limit open-status-page=always rate-limit=256k/256k shared-users=1 statusautorefresh=1m transparent-proxy=yes
/ip hotspot service-port set ftp disabled=yes ports=21
/ip hotspot walled-garden ip add action=accept disabled=no dst-address=190.79.8.
1
/ip hotspot set numbers=HOTSPOT address-pool=none
/ip firewall nat add action=masquerade chain=srcnat disabled=no
/ip hotspot user
add disabled=no name=admin password=777777 profile=default
add disabled=no name=test-512k password=1234 profile= 512k Limit server=HOTSPOT
add disabled=no name=test-256k password=1234 profile= 256k Limit server=HOTSPOT

You might also like