Advertisement
Guest User

Untitled

a guest
Mar 21st, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 5.63 KB | None | 0 0
  1. # mar/21/2017 15:17:56 by RouterOS 6.38.4
  2. # software id = U05N-G90F
  3. #
  4. /interface bridge
  5. add name=bridge1
  6. /interface ethernet
  7. set [ find default-name=ether1 ] name=WAN1
  8. set [ find default-name=ether2 ] name=WAN2
  9. /interface pppoe-client
  10. add add-default-route=yes disabled=no interface=WAN1 name=pppoe-out1 \
  11.     password=pass use-peer-dns=yes user=user
  12. add add-default-route=yes disabled=no interface=WAN2 name=pppoe-out2 \
  13.     password=pass use-peer-dns=yes user=user
  14. /interface l2tp-client
  15. add connect-to=mtvpn.gotdns.com name=l2tp-to-hq password=Branch-l2tp user=\
  16.     branch1-l2p
  17. /interface pptp-server
  18. add name=pptp-in1 user=""
  19. /interface wireless security-profiles
  20. set [ find default=yes ] supplicant-identity=MikroTik
  21. /ip pool
  22. add name=dhcp_pool1 ranges=192.168.21.50-192.168.21.254
  23. /ip dhcp-server
  24. add address-pool=dhcp_pool1 disabled=no interface=bridge1 lease-time=1d10m \
  25.     name=dhcp1
  26. /ppp profile
  27. add change-tcp-mss=yes dns-server=8.8.8.8 local-address=192.168.20.1 name=\
  28.     profile1 remote-address=192.168.21.49 use-encryption=yes
  29. add change-tcp-mss=yes dns-server=8.8.8.8 local-address=192.168.21.1 name=\
  30.     pptp-server remote-address=192.168.21.49 use-encryption=yes
  31. /interface bridge port
  32. add bridge=bridge1 interface=ether3
  33. add bridge=bridge1 interface=ether4
  34. add bridge=bridge1 interface=ether5
  35. /interface pptp-server server
  36. set authentication=pap,chap,mschap1,mschap2 default-profile=profile1 enabled=\
  37.     yes
  38. /ip address
  39. add address=192.168.21.1/24 interface=bridge1 network=192.168.21.0
  40. /ip cloud
  41. set ddns-enabled=yes
  42. /ip dhcp-client
  43. add default-route-distance=0 dhcp-options=hostname,clientid disabled=no \
  44.     interface=WAN2
  45. /ip dhcp-server network
  46. add address=192.168.20.0/24 gateway=192.168.20.1
  47. add address=192.168.21.0/24 dns-server=110.164.252.222,110.164.252.223 \
  48.     gateway=192.168.21.1
  49. /ip dns
  50. set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
  51. /ip firewall address-list
  52. add address=192.168.21.0/24 list=LAN
  53. /ip firewall mangle
  54. add action=accept chain=prerouting in-interface=pppoe-out1
  55. add action=accept chain=prerouting in-interface=pppoe-out2
  56. add action=mark-connection chain=prerouting comment=3bb-wan2 \
  57.     dst-address-type=!local new-connection-mark=wan1_conn passthrough=yes \
  58.     per-connection-classifier=both-addresses-and-ports:2/0 src-address=\
  59.     192.168.21.0/24
  60. add action=mark-connection chain=prerouting comment=3bb-wan1 \
  61.     dst-address-type=!local new-connection-mark=wan2_conn passthrough=yes \
  62.     per-connection-classifier=both-addresses-and-ports:2/1 src-address=\
  63.     192.168.21.0/24
  64. add action=mark-routing chain=prerouting comment=wan1 connection-mark=\
  65.     wan1_conn new-routing-mark=to_wan1 passthrough=yes src-address=\
  66.     192.168.21.0/24
  67. add action=mark-routing chain=prerouting comment=wan2 connection-mark=\
  68.     wan2_conn new-routing-mark=to_wan2 passthrough=yes src-address=\
  69.     192.168.21.0/24
  70. /ip firewall nat
  71. add action=masquerade chain=srcnat comment=HairpinNAT out-interface=bridge1 \
  72.     src-address-list=LAN
  73. add action=dst-nat chain=dstnat dst-address-type=local dst-port=88 protocol=\
  74.     tcp src-address-list=LAN to-addresses=192.168.21.21 to-ports=88
  75. add action=dst-nat chain=dstnat dst-address-type=local dst-port=37777 \
  76.     protocol=tcp src-address-list=LAN to-addresses=192.168.21.20 to-ports=\
  77.     37777
  78. add action=dst-nat chain=dstnat dst-address-type=local dst-port=8000 \
  79.     protocol=tcp src-address-list=LAN to-addresses=192.168.21.20 to-ports=\
  80.     8000
  81. add action=dst-nat chain=dstnat dst-address-type=local dst-port=6036 \
  82.     protocol=tcp src-address-list=LAN to-addresses=192.168.21.21 to-ports=\
  83.     6036
  84. add action=dst-nat chain=dstnat comment=Normal dst-port=88 in-interface=\
  85.     pppoe-out1 protocol=tcp to-addresses=192.168.21.21 to-ports=88
  86. add action=dst-nat chain=dstnat dst-port=37777 in-interface=pppoe-out1 \
  87.     protocol=tcp to-addresses=192.168.21.20 to-ports=37777
  88. add action=dst-nat chain=dstnat dst-port=8000 in-interface=pppoe-out1 \
  89.     protocol=tcp to-addresses=192.168.21.20 to-ports=8000
  90. add action=dst-nat chain=dstnat dst-port=6036 in-interface=pppoe-out1 \
  91.     protocol=tcp to-addresses=192.168.21.21 to-ports=6036
  92. add action=masquerade chain=srcnat comment="nat pppoE wan2" out-interface=\
  93.     pppoe-out1
  94. add action=masquerade chain=srcnat comment="nat pppoEwan1" out-interface=\
  95.     pppoe-out2
  96. /ip route
  97. add check-gateway=ping comment=route1 distance=1 gateway=pppoe-out1 \
  98.     routing-mark=to_wan1
  99. add check-gateway=ping comment=route2 distance=1 gateway=pppoe-out2 \
  100.     routing-mark=to_wan2
  101. add check-gateway=ping comment=router11 distance=1 gateway=pppoe-out1
  102. add check-gateway=ping comment=router22 distance=1 gateway=pppoe-out2
  103. add distance=1 dst-address=192.168.0.0/24 gateway=l2tp-to-hq
  104. /ip service
  105. set telnet disabled=yes
  106. set www disabled=yes
  107. set ssh disabled=yes
  108. set api disabled=yes
  109. set api-ssl disabled=yes
  110. /ppp secret
  111. add local-address=192.168.21.1 name=vvee421245 password=gtHy221y55 profile=\
  112.     profile1 remote-address=192.168.21.49 service=pptp
  113. add local-address=192.168.21.1 name=pptp-server password=pptp-server profile=\
  114.     pptp-server remote-address=192.168.21.49 service=pptp
  115. /system clock
  116. set time-zone-name=Asia/Bangkok
  117. /system identity
  118. set name=Jasmin
  119. /system scheduler
  120. add interval=1d name=system-reboot on-event=system-reboot policy=\
  121.     reboot,read,write start-date=nov/06/2012 start-time=03:00:00
  122. add disabled=yes interval=1m name=dyn on-event="/system script run dyn" \
  123.     policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
  124.     start-date=feb/02/2017 start-time=04:17:34
  125. /system script
  126. add name=system-reboot owner=tzmt policy=reboot source="/system reboot"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement