Advertisement
Guest User

Untitled

a guest
Apr 28th, 2023
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.18 KB | None | 0 0
  1. # apr/28/2023 05:42:51 by RouterOS 7.8
  2. # software id = D0IW-6RGM
  3. #
  4. # model = RB5009UPr+S+
  5. # serial number = 1234fdf334
  6. /interface bridge
  7. add admin-mac=18:gD:74:hC:AE:EE auto-mac=no comment=defconf name=bridge
  8. add name=docker
  9. add name=docker2
  10. /interface ethernet
  11. set [ find default-name=ether2 ] poe-out=forced-on
  12. set [ find default-name=ether3 ] poe-out=forced-on
  13. set [ find default-name=ether7 ] poe-out=forced-on
  14. /interface veth
  15. add address=172.17.0.2/24 disabled=yes gateway=172.17.0.1 name=veth1
  16. add address=172.17.0.3/24 disabled=yes gateway=172.17.0.11 name=veth2
  17. /disk
  18. add parent=usb1 partition-number=1 partition-offset=512 partition-size=\
  19. "252 161 555 968" type=partition
  20. /interface list
  21. add comment=defconf name=WAN
  22. add comment=defconf name=LAN
  23. /interface wireless security-profiles
  24. set [ find default=yes ] supplicant-identity=MikroTik
  25. /ip pool
  26. add name=dhcp ranges=192.168.88.10-192.168.88.254
  27. /ip dhcp-server
  28. add address-pool=dhcp interface=bridge name=defconf
  29. /container config
  30. set registry-url=https://registry-1.docker.io tmpdir=usb1-part1/pull
  31. /interface bridge port
  32. add bridge=bridge comment=defconf interface=ether2
  33. add bridge=bridge comment=defconf interface=ether3
  34. add bridge=bridge comment=defconf interface=ether4
  35. add bridge=bridge comment=defconf interface=ether5
  36. add bridge=bridge comment=defconf interface=ether6
  37. add bridge=bridge comment=defconf interface=ether7
  38. add bridge=bridge comment=defconf interface=ether8
  39. add bridge=bridge comment=defconf interface=sfp-sfpplus1
  40. add bridge=docker interface=veth1
  41. add bridge=docker2 interface=veth2
  42. /ip neighbor discovery-settings
  43. set discover-interface-list=LAN
  44. /interface list member
  45. add comment=defconf interface=bridge list=LAN
  46. add comment=defconf interface=ether1 list=WAN
  47. /ip address
  48. add address=192.168.88.2/24 comment=defconf interface=bridge network=\
  49. 192.168.88.0
  50. add address=172.17.0.1/24 interface=docker network=172.17.0.0
  51. add address=172.17.0.11/24 interface=docker2 network=172.17.0.0
  52. /ip dhcp-client
  53. add comment=defconf interface=ether1
  54. /ip dhcp-server lease
  55. add address=192.168.88.247 client-id=\
  56. ff:b6:22:f:eb:0:2:0:0:ab:11:75:4f:44:12:20:83:68:ae mac-address=\
  57. 58:47:CA:70:46:80 server=defconf
  58. /ip dhcp-server network
  59. add address=192.168.88.0/24 comment=defconf dns-server=8.8.8.8 gateway=\
  60. 192.168.88.2 netmask=24
  61. /ip dns
  62. set allow-remote-requests=yes
  63. /ip dns static
  64. add address=192.168.88.2 comment=defconf name=router.lan
  65. /ip firewall filter
  66. add action=accept chain=input comment=\
  67. "defconf: accept established,related,untracked" connection-state=\
  68. established,related,untracked
  69. add action=drop chain=input comment="defconf: drop invalid" connection-state=\
  70. invalid
  71. add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
  72. add action=accept chain=input comment=\
  73. "defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
  74. add action=drop chain=input comment="defconf: drop all not coming from LAN" \
  75. in-interface-list=!LAN
  76. add action=accept chain=forward comment="defconf: accept in ipsec policy" \
  77. ipsec-policy=in,ipsec
  78. add action=accept chain=forward comment="defconf: accept out ipsec policy" \
  79. ipsec-policy=out,ipsec
  80. add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
  81. connection-state=established,related hw-offload=yes
  82. add action=accept chain=forward comment=\
  83. "defconf: accept established,related, untracked" connection-state=\
  84. established,related,untracked
  85. add action=drop chain=forward comment="defconf: drop invalid" \
  86. connection-state=invalid
  87. add action=drop chain=forward comment=\
  88. "defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
  89. connection-state=new in-interface-list=WAN
  90. /ip firewall nat
  91. add action=masquerade chain=srcnat comment="defconf: masquerade" \
  92. ipsec-policy=out,none out-interface-list=WAN
  93. add action=masquerade chain=srcnat src-address=172.17.0.0/24
  94. add action=dst-nat chain=dstnat dst-address=192.168.88.2 dst-port=888 \
  95. protocol=tcp to-addresses=172.17.0.3 to-ports=80
  96. /ipv6 firewall address-list
  97. add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
  98. add address=::1/128 comment="defconf: lo" list=bad_ipv6
  99. add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
  100. add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
  101. add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
  102. add address=100::/64 comment="defconf: discard only " list=bad_ipv6
  103. add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
  104. add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
  105. add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
  106. /ipv6 firewall filter
  107. add action=accept chain=input comment=\
  108. "defconf: accept established,related,untracked" connection-state=\
  109. established,related,untracked
  110. add action=drop chain=input comment="defconf: drop invalid" connection-state=\
  111. invalid
  112. add action=accept chain=input comment="defconf: accept ICMPv6" protocol=\
  113. icmpv6
  114. add action=accept chain=input comment="defconf: accept UDP traceroute" port=\
  115. 33434-33534 protocol=udp
  116. add action=accept chain=input comment=\
  117. "defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
  118. udp src-address=fe80::/10
  119. add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
  120. protocol=udp
  121. add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
  122. ipsec-ah
  123. add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
  124. ipsec-esp
  125. add action=accept chain=input comment=\
  126. "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
  127. add action=drop chain=input comment=\
  128. "defconf: drop everything else not coming from LAN" in-interface-list=\
  129. !LAN
  130. add action=accept chain=forward comment=\
  131. "defconf: accept established,related,untracked" connection-state=\
  132. established,related,untracked
  133. add action=drop chain=forward comment="defconf: drop invalid" \
  134. connection-state=invalid
  135. add action=drop chain=forward comment=\
  136. "defconf: drop packets with bad src ipv6" src-address-list=bad_ipv6
  137. add action=drop chain=forward comment=\
  138. "defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
  139. add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
  140. hop-limit=equal:1 protocol=icmpv6
  141. add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
  142. icmpv6
  143. add action=accept chain=forward comment="defconf: accept HIP" protocol=139
  144. add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
  145. 500,4500 protocol=udp
  146. add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
  147. ipsec-ah
  148. add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
  149. ipsec-esp
  150. add action=accept chain=forward comment=\
  151. "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
  152. add action=drop chain=forward comment=\
  153. "defconf: drop everything else not coming from LAN" in-interface-list=\
  154. !LAN
  155. /system identity
  156. set name="My router"
  157. /tool mac-server
  158. set allowed-interface-list=LAN
  159. /tool mac-server mac-winbox
  160. set allowed-interface-list=LAN
  161.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement