teknisiazza

load.mangle.hotspot.2015.03.26.1

Mar 24th, 2016
186
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # mar/26/2016 00:48:31 by RouterOS 6.9
  2. # software id = 7CGI-FIJM
  3. #
  4. /interface ethernet
  5. set [ find default-name=ether3 ] name=LAN1
  6. set [ find default-name=ether1 ] name=WAN1
  7. set [ find default-name=ether2 ] name=WAN2
  8. /ip hotspot profile
  9. add dns-name=smkn1cdp.wifi hotspot-address=10.10.10.1 login-by=http-chap \
  10. name=hsprof1
  11. /ip hotspot user profile
  12. set [ find default=yes ] idle-timeout=none keepalive-timeout=2m \
  13. mac-cookie-timeout=3d
  14. /ip pool
  15. add name=hs-pool-3 ranges=10.10.10.2-10.10.10.254
  16. /ip dhcp-server
  17. add address-pool=hs-pool-3 disabled=no interface=LAN1 lease-time=1h name=\
  18. dhcp1
  19. /ip hotspot
  20. add address-pool=hs-pool-3 disabled=no interface=LAN1 name=hotspot1 profile=\
  21. hsprof1
  22. /ip address
  23. add address=10.10.10.1/24 interface=LAN1 network=10.10.10.0
  24. add address=192.168.1.2/24 interface=WAN1 network=192.168.1.0
  25. add address=192.168.2.2/24 interface=WAN2 network=192.168.2.0
  26. /ip dhcp-server network
  27. add address=10.10.10.0/24 comment="hotspot network" gateway=10.10.10.1
  28. /ip dns
  29. set allow-remote-requests=yes cache-size=5000KiB max-udp-packet-size=512 \
  30. servers=8.8.8.8
  31. /ip firewall filter
  32. add action=passthrough chain=unused-hs-chain comment=\
  33. "place hotspot rules here" disabled=yes
  34. /ip firewall mangle
  35. add action=mark-connection chain=input in-interface=WAN1 new-connection-mark=\
  36. WAN1_conn
  37. add action=mark-connection chain=input in-interface=WAN2 new-connection-mark=\
  38. WAN2_conn
  39. add action=mark-routing chain=output connection-mark=WAN1_conn \
  40. new-routing-mark=to_WAN1
  41. add action=mark-routing chain=output connection-mark=WAN2_conn \
  42. new-routing-mark=to_WAN2
  43. add chain=prerouting dst-address=192.168.1.0/24 in-interface=LAN1
  44. add chain=prerouting dst-address=192.168.2.0/24 in-interface=LAN1
  45. add action=mark-connection chain=prerouting dst-address-type=!local \
  46. in-interface=LAN1 new-connection-mark=WAN1_conn \
  47. per-connection-classifier=both-addresses-and-ports:2/0
  48. add action=mark-connection chain=prerouting dst-address-type=!local \
  49. in-interface=LAN1 new-connection-mark=WAN2_conn \
  50. per-connection-classifier=both-addresses-and-ports:2/1
  51. #Jika Anda memiliki Un-Sama WAN Links, misalnya WAN, 1 adalah dari 4MB dan WAN, 2 adalah dari 8 Mb,
  52. #dan Anda ingin memaksa MT untuk menggunakan WAN2 Link lebih dari yang lain karena kapasitasnya
  53.  
  54. add chain=prerouting dst-address-type=!local in-interface=LAN1 per-connection-classifier=both-addresses-and-ports:2/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
  55.  
  56. add action=mark-routing chain=prerouting connection-mark=WAN1_conn \
  57. in-interface=LAN1 new-routing-mark=to_WAN1
  58. add action=mark-routing chain=prerouting connection-mark=WAN2_conn \
  59. in-interface=LAN1 new-routing-mark=to_WAN2
  60. /ip firewall nat
  61. add action=passthrough chain=unused-hs-chain comment=\
  62. "place hotspot rules here" disabled=yes
  63. add action=masquerade chain=srcnat out-interface=WAN1
  64. add action=masquerade chain=srcnat out-interface=WAN2
  65. add chain=pre-hotspot dst-address-type=!local hotspot=auth to-addresses=\
  66. 0.0.0.0
  67. /ip hotspot user
  68. add name=test password=1234
  69. /ip route
  70. add check-gateway=ping distance=1 gateway=192.168.1.1 routing-mark=to_WAN1
  71. add check-gateway=ping distance=1 gateway=192.168.2.1 routing-mark=to_WAN2
  72. add check-gateway=ping distance=1 gateway=192.168.1.1
  73. add check-gateway=ping distance=2 gateway=192.168.2.1
  74. /ip upnp
  75. set allow-disable-external-interface=no
  76. /system lcd
  77. set contrast=0 enabled=no port=parallel type=24x4
  78. /system lcd page
  79. set time disabled=yes display-time=5s
  80. set resources disabled=yes display-time=5s
  81. set uptime disabled=yes display-time=5s
  82. set packets disabled=yes display-time=5s
  83. set bits disabled=yes display-time=5s
  84. set version disabled=yes display-time=5s
  85. set identity disabled=yes display-time=5s
  86. set WAN1 disabled=yes display-time=5s
  87. set WAN2 disabled=yes display-time=5s
  88. set LAN1 disabled=yes display-time=5s
  89. set ether4 disabled=yes display-time=5s
RAW Paste Data