Advertisement
hadarelv

mikrotik-config-2

Jan 17th, 2022
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.71 KB | None | 0 0
  1.  
  2.  
  3. # model = RBwAPG-5HacT2HnD
  4.  
  5. # serial number = D8F80CB0C736
  6.  
  7. /interface bridge
  8.  
  9. add comment=defconf name=bridge
  10.  
  11. /interface list
  12.  
  13. add comment=defconf name=WAN
  14.  
  15. add comment=defconf name=LAN
  16.  
  17. /interface wireless security-profiles
  18.  
  19. set [ find default=yes ] supplicant-identity=MikroTik
  20.  
  21. add authentication-types=wpa-psk,wpa2-psk management-protection=allowed mode=dynamic-keys name=profile1 supplicant-identity=MikroTik
  22.  
  23. /interface wireless
  24.  
  25. set [ find default-name=wlan1 ] band=2ghz-b disabled=no distance=indoors frequency=auto installation=outdoor mode=ap-bridge security-profile=profile1 ssid=MikroTik-AA400E-2.4GHz wireless-protocol=802.11
  26.  
  27. set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=20/40/80mhz-XXXX disabled=no distance=indoors frequency=auto installation=outdoor mode=ap-bridge security-profile=profile1 ssid=MikroTik-AA400D-5GHz wireless-protocol=802.11
  28.  
  29. /ip hotspot profile
  30.  
  31. set [ find default=yes ] html-directory=flash/hotspot
  32.  
  33. /ip pool
  34.  
  35. add name=dhcp ranges=192.168.88.10-192.168.88.254
  36.  
  37. /ip dhcp-server
  38.  
  39. add address-pool=dhcp disabled=no interface=bridge name=defconf
  40.  
  41. /queue tree
  42.  
  43. add max-limit=10M name=to-fr-parent parent=global
  44.  
  45. add limit-at=200k max-limit=10M name=to-fr-high-prio packet-mark=br-high-prio-to-fr parent=to-fr-parent priority=1
  46.  
  47. add limit-at=2M max-limit=10M name=to-fr-low-prio packet-mark=br-bulk-to-fr parent=to-fr-parent
  48.  
  49. add max-limit=10M name=from-fr-parent parent=global
  50.  
  51. add limit-at=200k max-limit=10M name=from-fr-high-prio packet-mark=br-high-prio-from-fr parent=from-fr-parent priority=1
  52.  
  53. add limit-at=2M max-limit=10M name=from-fr-low-prio packet-mark=br-bulk-from-fr parent=from-fr-parent
  54.  
  55. /queue simple
  56.  
  57. add disabled=yes max-limit=10M/10M name=in-parent queue=default/default target=192.168.88.0/24
  58.  
  59. add disabled=yes limit-at=1M/1M max-limit=10M/10M name=in-high-prio packet-marks=br-high-prio parent=in-parent priority=1/1 target=192.168.88.0/24
  60.  
  61. add disabled=yes limit-at=2M/2M max-limit=10M/10M name=in-bulk packet-marks=br-bulk parent=in-parent queue=default/default target=192.168.88.0/24
  62.  
  63. /interface bridge filter
  64.  
  65. add action=mark-packet chain=forward dst-address=192.168.88.254/32 dst-port=5150 ip-protocol=tcp log=yes mac-protocol=ip new-packet-mark=br-high-prio-to-fr
  66.  
  67. add action=mark-packet chain=forward ip-protocol=tcp log=yes mac-protocol=ip new-packet-mark=br-high-prio-from-fr src-address=192.168.88.254/32 src-port=5150
  68.  
  69. add action=mark-packet chain=forward ip-protocol=tcp log=yes mac-protocol=ip new-packet-mark=br-bulk-from-fr src-address=192.168.88.254/32 src-port=!5150
  70.  
  71. add action=mark-packet chain=forward dst-address=192.168.88.254/32 dst-port=!5150 ip-protocol=tcp log=yes mac-protocol=ip new-packet-mark=br-bulk-to-fr
  72.  
  73. /interface bridge port
  74.  
  75. add bridge=bridge comment=defconf interface=wlan1
  76.  
  77. add bridge=bridge comment=defconf interface=wlan2
  78.  
  79. add bridge=bridge interface=ether1
  80.  
  81. /interface bridge settings
  82.  
  83. set use-ip-firewall=yes
  84.  
  85. /ip neighbor discovery-settings
  86.  
  87. set discover-interface-list=LAN
  88.  
  89. /interface list member
  90.  
  91. add comment=defconf interface=bridge list=LAN
  92.  
  93. add comment=defconf interface=ether1 list=WAN
  94.  
  95. /ip address
  96.  
  97. add address=192.168.88.1/24 comment=defconf interface=bridge network=192.168.88.0
  98.  
  99. /ip dhcp-client
  100.  
  101. # DHCP client can not run on slave interface!
  102.  
  103. add comment=defconf dhcp-options=hostname,clientid disabled=no interface=ether1
  104.  
  105. /ip dhcp-server network
  106.  
  107. add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1
  108.  
  109. /ip dns
  110.  
  111. set allow-remote-requests=yes
  112.  
  113. /ip dns static
  114.  
  115. add address=192.168.88.1 comment=defconf name=router.lan
  116.  
  117. /ip firewall filter
  118.  
  119. add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
  120.  
  121. add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
  122.  
  123. add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
  124.  
  125. add action=accept chain=input comment="defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
  126.  
  127. add action=drop chain=input comment="defconf: drop all not coming from LAN" in-interface-list=!LAN
  128.  
  129. add action=accept chain=forward comment="defconf: accept in ipsec policy" ipsec-policy=in,ipsec
  130.  
  131. add action=accept chain=forward comment="defconf: accept out ipsec policy" ipsec-policy=out,ipsec
  132.  
  133. add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related disabled=yes
  134.  
  135. add action=accept chain=forward comment="defconf: accept established,related, untracked" connection-state=established,related,untracked
  136.  
  137. add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
  138.  
  139. add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat connection-state=new in-interface-list=WAN
  140.  
  141. /ip firewall mangle
  142.  
  143. add action=mark-packet chain=forward disabled=yes dst-port=5150 log=yes log-prefix=PrioToFR new-packet-mark=high-prio passthrough=yes protocol=tcp src-address=192.168.88.21
  144.  
  145. add action=mark-packet chain=forward disabled=yes log=yes log-prefix=PrioFromFR new-packet-mark=high-prio passthrough=yes protocol=tcp src-address=192.168.88.254 src-port=5150
  146.  
  147. add action=mark-packet chain=forward disabled=yes dst-port=!5150 new-packet-mark=bulk passthrough=yes protocol=tcp src-address=192.168.88.21
  148.  
  149. add action=mark-packet chain=forward disabled=yes new-packet-mark=bulk passthrough=yes protocol=tcp src-address=192.168.88.254 src-port=!5150
  150.  
  151. /ip firewall nat
  152.  
  153. add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN
  154.  
  155. /tool mac-server
  156.  
  157. set allowed-interface-list=LAN
  158.  
  159. /tool mac-server mac-winbox
  160.  
  161. set allowed-interface-list=LAN
  162.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement