Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- note:yes i forgot to reenable the failover config before exporting same thing for the port forward config thats on the mangle rule
- # jan/15/2022 00:40:48 by RouterOS 6.47.9
- # software id = 15PR-UVFG
- #
- # model = RB3011UiAS
- # serial number = E7E90E987607
- /interface bridge
- add name="bridgeLAN BACKUP"
- add name="bridgeLAN MAIN"
- /interface ethernet
- set [ find default-name=ether1 ] name="WAN 1 INPUT"
- /interface pppoe-client
- add add-default-route=yes disabled=no interface=ether2 keepalive-timeout=100 \
- name="WAN 2 INPUT" user=BTS625064
- /interface bonding
- add mode=802.3ad name=" TO SWITCH" slaves=ether10,ether9,ether8 \
- transmit-hash-policy=layer-3-and-4
- /interface list
- add name=list1
- /interface wireless security-profiles
- set [ find default=yes ] supplicant-identity=MikroTik
- /ip pool
- add name=dhcp_pool0 ranges=[static wan ip address]
- add name=dhcp_pool1 ranges=192.168.88.2-192.168.88.254
- add name=dhcp_pool2 ranges=100.64.6.2-100.64.6.254
- add name=dhcp_pool3 ranges=192.168.88.2-192.168.88.254
- add name=dhcp_pool4 ranges=100.70.8.2-100.70.11.254
- add name=dhcp_pool5 ranges=100.100.5.2
- add name=dhcp_pool6 ranges=172.16.16.2-172.16.16.254
- add name=dhcp_pool7 ranges=172.16.16.2-172.16.16.254
- add name=dhcp_pool8 ranges=\
- 192.168.88.1-192.168.88.9,192.168.88.11-192.168.88.254
- /ip dhcp-server
- add address-pool=dhcp_pool4 disabled=no interface="bridgeLAN MAIN" name=dhcp3
- /port
- set 1 baud-rate=9600 data-bits=8 flow-control=none name=usb2 parity=none \
- stop-bits=1
- /queue simple
- add disabled=yes max-limit=40M/40M name=queue1 target="WAN 2 INPUT"
- /queue type
- set 9 kind=sfq
- /interface bridge port
- add bridge="bridgeLAN BACKUP" interface=ether5
- add bridge="bridgeLAN MAIN" interface=ether6
- add bridge="bridgeLAN MAIN" interface=ether7
- add bridge="bridgeLAN MAIN" interface=" TO SWITCH"
- /interface list member
- add interface="bridgeLAN MAIN" list=list1
- /ip address
- add address=[static wan ip address]/30 comment="WAN 1 " interface="WAN 1 INPUT" \
- network=[static wan ip address]
- add address=192.168.88.10/24 interface="bridgeLAN BACKUP" network=\
- 192.168.88.0
- add address=100.70.8.1/22 interface="bridgeLAN MAIN" network=100.70.8.0
- add address=100.100.0.1/16 interface=" TO SWITCH" network=100.100.0.0
- add address=10.255.255.1/29 interface=" TO SWITCH" network=10.255.255.0
- add address=100.64.0.0/10 interface="bridgeLAN MAIN" network=100.64.0.0
- /ip dhcp-server network
- add address=10.0.0.59/32 gateway=10.0.0.1
- add address=100.64.6.0/24 gateway=100.64.6.1
- add address=100.70.8.0/22 dns-server=1.0.0.1,1.1.1.1,8.8.8.8,10.0.0.11 \
- gateway=100.70.8.1
- add address=[static wan ip address]/30 gateway=[static wan ip address]
- add address=172.16.16.0/24 gateway=172.16.16.1
- add address=192.168.88.0/24 dns-server=1.0.0.1,1.1.1.1,8.8.8.8,10.0.0.1 \
- gateway=192.168.88.10
- /ip dns
- set allow-remote-requests=yes servers=1.0.0.1,1.1.1.1,8.8.8.8
- /ip firewall address-list
- add address=100.70.8.0/22 list="MAIN "
- add address=100.100.0.0/16 list="MAIN "
- add address=[static wan ip address] list=WAN
- add address=192.168.0.0 list=WAN
- /ip firewall mangle
- add action=accept chain=prerouting dst-address=[static wan ip address]/30
- add action=accept chain=prerouting dst-address=10.9.0.0
- add action=accept chain=prerouting dst-address=100.70.8.0/22
- add action=mark-connection chain=prerouting in-interface="WAN 1 INPUT" \
- new-connection-mark="WAN 1" passthrough=yes
- add action=mark-connection chain=prerouting in-interface="WAN 2 INPUT" \
- new-connection-mark="WAN 2" passthrough=yes
- add action=mark-connection chain=prerouting comment="WAN 1" in-interface=\
- "bridgeLAN MAIN" new-connection-mark="WAN 1" passthrough=yes \
- per-connection-classifier=both-addresses-and-ports:8/0
- add action=mark-connection chain=prerouting comment="WAN 2" in-interface=\
- "bridgeLAN MAIN" new-connection-mark="WAN 2" passthrough=yes \
- per-connection-classifier=both-addresses-and-ports:8/1
- add action=mark-connection chain=prerouting in-interface="bridgeLAN MAIN" \
- new-connection-mark="WAN 2" passthrough=yes per-connection-classifier=\
- both-addresses-and-ports:8/2
- add action=mark-connection chain=prerouting in-interface="bridgeLAN MAIN" \
- new-connection-mark="WAN 2" passthrough=yes per-connection-classifier=\
- both-addresses-and-ports:8/3
- add action=mark-connection chain=prerouting in-interface="bridgeLAN MAIN" \
- new-connection-mark="WAN 2" passthrough=yes per-connection-classifier=\
- both-addresses-and-ports:8/4
- add action=mark-connection chain=prerouting in-interface="bridgeLAN MAIN" \
- new-connection-mark="WAN 2" passthrough=yes per-connection-classifier=\
- both-addresses-and-ports:8/5
- add action=mark-connection chain=prerouting in-interface="bridgeLAN MAIN" \
- new-connection-mark="WAN 2" passthrough=yes per-connection-classifier=\
- both-addresses-and-ports:8/6
- add action=mark-connection chain=prerouting in-interface="bridgeLAN MAIN" \
- new-connection-mark="WAN 2" passthrough=yes per-connection-classifier=\
- both-addresses-and-ports:8/7
- add action=mark-routing chain=prerouting comment=A connection-mark="WAN 1" \
- in-interface="bridgeLAN MAIN" new-routing-mark="TO WAN 1" passthrough=yes
- add action=mark-routing chain=output connection-mark="WAN 1" \
- new-routing-mark="TO WAN 1" passthrough=no
- add action=mark-routing chain=prerouting connection-mark="WAN 2" \
- in-interface="bridgeLAN MAIN" new-routing-mark="TO WAN 2" passthrough=yes
- add action=mark-routing chain=output connection-mark="WAN 2" \
- new-routing-mark="TO WAN 2" passthrough=no
- add action=mark-connection chain=prerouting comment="PORT FORWARD" \
- connection-mark=no-mark disabled=yes in-interface="WAN 1 INPUT" \
- new-connection-mark="wan 1 conn" passthrough=yes
- add action=mark-routing chain=output connection-mark="wan 1 conn" disabled=\
- yes new-routing-mark="TO WAN 1" passthrough=yes
- /ip firewall nat
- add action=masquerade chain=srcnat out-interface="WAN 1 INPUT"
- add action=masquerade chain=srcnat out-interface="WAN 2 INPUT"
- add action=masquerade chain=srcnat out-interface="WAN 1 INPUT" src-address=\
- 100.70.8.0/22
- add action=masquerade chain=srcnat disabled=yes out-interface="WAN 1 INPUT" \
- src-address=192.168.88.0/24
- add action=masquerade chain=srcnat comment="HAIRPIN NAT" dst-address=\
- 100.70.8.10 src-address=100.70.8.0/22
- add action=src-nat chain=srcnat comment="PORT FORWARD" out-interface=\
- "WAN 1 INPUT" src-address=100.70.8.10 to-addresses=[static wan ip address]
- add action=dst-nat chain=dstnat dst-address=[static wan ip address] to-addresses=\
- 100.70.8.10
- /ip route
- add check-gateway=ping distance=1 gateway=[static wan ip address] routing-mark=\
- "TO WAN 1"
- add check-gateway=ping disabled=yes distance=2 gateway=10.9.0.1 routing-mark=\
- "TO WAN 1"
- add distance=1 gateway=10.9.0.1 routing-mark="TO WAN 2"
- add check-gateway=ping disabled=yes distance=2 gateway=[static wan ip address] \
- routing-mark="TO WAN 2"
- /ip service
- set telnet disabled=yes
- set ftp disabled=yes
- set www disabled=yes
- set ssh disabled=yes
- set api disabled=yes
- set winbox port=5900
- set api-ssl disabled=yes
- /lcd
- set backlight-timeout=never default-screen=stats
- /lcd interface
- add interface="bridgeLAN MAIN"
- /system clock
- set time-zone-name=Asia
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement