How do I go about routing WAN1 to LAN1 and WAN2 to LAN2 etc..
I tried setting up masq rules but seems like only the first one is being used.
Kind regards
Code: Select all
/ip firewall filter
# mar/11/2020 16:44:32 by RouterOS 6.46.4
# software id = BYSX-Q3MA
#
# model = RB3011UiAS
# serial number = B8950B138191
/interface bridge
add name=bridge_default
add name=bridge_gasten
add name=bridge_lionhead
add name=bridge_voice
/interface ethernet
set [ find default-name=ether1 ] mac-address=74:4D:28:11:F8:C8 name=WAN1 speed=\
100Mbps
set [ find default-name=ether2 ] mac-address=74:4D:28:11:F8:C9 name=WAN2 speed=\
100Mbps
set [ find default-name=ether3 ] mac-address=74:4D:28:11:F8:CA name=WAN3 speed=\
100Mbps
set [ find default-name=ether4 ] mac-address=74:4D:28:11:F8:CB name=WAN4 speed=\
100Mbps
set [ find default-name=ether5 ] mac-address=74:4D:28:11:F8:CC speed=100Mbps
set [ find default-name=ether6 ] mac-address=74:4D:28:11:F8:CE speed=100Mbps
set [ find default-name=ether7 ] mac-address=74:4D:28:11:F8:CF name=\
ether7-Lionhead speed=100Mbps
set [ find default-name=ether8 ] mac-address=74:4D:28:11:F8:D0 name=\
ether8-RasberryPI speed=100Mbps
set [ find default-name=ether9 ] mac-address=74:4D:28:11:F8:D1 name=ether9-UNSW \
speed=100Mbps
set [ find default-name=ether10 ] mac-address=74:4D:28:11:F8:D2 name=\
ether10-UNSW speed=100Mbps
set [ find default-name=sfp1 ] advertise=\
10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full mac-address=\
74:4D:28:11:F8:CD
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp_pool0 ranges=10.0.7.20-10.0.7.254
add name=dhcp_pool1 ranges=192.168.8.2-192.168.8.254
add name=dhcp_pool2 ranges=192.168.7.2-192.168.7.254
add name=dhcp_pool3 ranges=172.16.0.2-172.16.0.254
/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=bridge_default lease-time=1d \
name=dhcp1
add address-pool=dhcp_pool1 disabled=no interface=bridge_gasten lease-time=\
1d10m name=dhcp2
add address-pool=dhcp_pool2 disabled=no interface=bridge_voice lease-time=1d10m \
name=dhcp3
add address-pool=dhcp_pool3 disabled=no interface=bridge_lionhead lease-time=1d \
name=dhcp4
/interface pppoe-client
add disabled=no interface=WAN1 name=pppoe-out1 profile=default-encryption \
use-peer-dns=yes user=CRPCT280363448
add disabled=no interface=WAN2 name=pppoe-out2 profile=default-encryption user=\
CRPCT280363467
/snmp community
set [ find default=yes ] addresses=145.131.157.110/32 authentication-protocol=\
SHA1 name=snmpv3ictsguser security=private
/interface bridge port
add bridge=bridge_default interface=ether10-UNSW
add bridge=bridge_default interface=ether9-UNSW
add bridge=bridge_default interface=ether6
add bridge=bridge_default interface=ether8-RasberryPI
add bridge=bridge_lionhead interface=ether7-Lionhead
/ip address
add address=10.0.7.1/24 interface=bridge_default network=10.0.7.0
add address=192.168.8.1/24 interface=bridge_gasten network=192.168.8.0
add address=192.168.7.1/24 interface=bridge_voice network=192.168.7.0
add address=172.16.0.1/24 interface=bridge_lionhead network=172.16.0.0
/ip dhcp-client
# DHCP client can not run on slave interface!
add add-default-route=no disabled=no interface=ether7-Lionhead
/ip dhcp-server network
add address=10.0.7.0/24 dns-server=208.91.112.53,208.91.112.52 gateway=10.0.7.1
add address=172.16.0.0/24 dns-server=208.91.112.53,208.91.112.52 gateway=\
172.16.0.1
add address=192.168.7.0/24 dns-server=213.144.235.1,213.144.235.2 gateway=\
192.168.7.1
add address=192.168.8.0/24 dns-server=208.91.112.53,208.91.112.52 gateway=\
192.168.8.1
add action=drop chain=input comment="CUSTOM: WINBOX Drop Traffic to Winbox Port \
where src-address-list!=Winbox_Admin" dst-port=8291 protocol=tcp \
src-address-list=!Winbox_Admin
/ip firewall mangle
add action=mark-connection chain=input connection-mark=no-mark in-interface=\
pppoe-out1 new-connection-mark=WAN1_ROS passthrough=yes
add action=mark-connection chain=input connection-mark=no-mark in-interface=\
pppoe-out2 new-connection-mark=WAN2_ROS passthrough=yes
add action=mark-routing chain=output connection-mark=WAN1_ROS new-routing-mark=\
WAN1 passthrough=no
add action=mark-routing chain=output connection-mark=WAN2_ROS new-routing-mark=\
WAN2 passthrough=no
add action=mark-connection chain=forward connection-mark=no-mark in-interface=\
pppoe-out1 new-connection-mark=WAN1-LAN passthrough=no
add action=mark-connection chain=forward connection-mark=no-mark in-interface=\
pppoe-out2 new-connection-mark=WAN2-LAN passthrough=no
add action=mark-routing chain=prerouting connection-mark=WAN1-LAN \
new-routing-mark=WAN1 passthrough=yes src-address-list=Lan1
add action=mark-routing chain=prerouting connection-mark=WAN2-LAN \
new-routing-mark=WAN2 passthrough=yes src-address-list=Lan2
/ip firewall nat
add action=masquerade chain=srcnat out-interface=pppoe-out1
add action=masquerade chain=srcnat out-interface=pppoe-out2
/ip firewall service-port
set sip disabled=yes
/ip route
add check-gateway=ping distance=1 gateway=pppoe-out1 routing-mark=WAN1
add check-gateway=ping distance=1 gateway=pppoe-out2 routing-mark=WAN2
add distance=1 gateway=pppoe-out1
add check-gateway=ping distance=1 gateway=pppoe-out2
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/snmp
set enabled=yes trap-generators=interfaces,temp-exception trap-interfaces=all \
trap-target=94.190.207.83 trap-version=3
/system clock
set time-zone-name=Europe/Bucharest