Hi.
I have two internet connections. WAN1 (DHCP For the family) and WAN2 (PPPoE for my business I run from home)
I have a network of 172.16.0.1/23 - DHCP range is 172.16.0.10-172.16.0.250
The reserved IP for my work stuff is in the range of 172.16.1.x
I want all traffic from 172.16.0.x to go via WAN1, and all traffic from 172.16.1.x to go via WAN2. But I just cant get it to work. I’m a sort of noob. Not to networking, just MikroTik.
Here’s my config.
Thanks in advance…
Doug
# 2024-10-07 14:11:46 by RouterOS 7.16
# model = RB750Gr3
/interface bridge
add admin-mac=DC:2C:6E:DF:DF:BE auto-mac=no comment=defconf name=bridge
/interface ethernet
set [ find default-name=ether1 ] comment=Three
/interface pppoe-client
add add-default-route=yes interface=ether2 name=pppoe-out1 password=\
xxxxxxxxxxxxxxxx user=xxxxxxxxxxxxxxxxx@xxxxxxxxxxxxx.net
/disk
set sd1 media-interface=none media-sharing=no
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=172.16.0.1-172.16.0.250
/ip dhcp-server
add address-pool=dhcp interface=bridge lease-time=1d name=defconf
/routing table
add comment=To-Three disabled=no fib name=To-Three
add comment=To-ICUK disabled=no fib name=To-ICUK
/disk settings
set auto-media-interface=bridge auto-media-sharing=yes auto-smb-sharing=yes
/interface bridge port
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=Three interface=ether1 list=WAN
/ip address
add address=172.16.0.1/23 comment=defconf interface=bridge network=172.16.0.0
add address=192.168.8.10/24 interface=ether1 network=192.168.8.0
/ip dhcp-client
add comment=defconf disabled=yes interface=ether1
/ip dhcp-server lease
add address=172.16.1.110 address-lists=DIT client-id=1:a8:64:f1:47:f5:68 \
mac-address=A8:64:F1:47:F5:68 server=defconf
/ip dhcp-server network
add address=172.16.0.0/23 comment=defconf dns-server=172.16.0.1 gateway=\
172.16.0.1 netmask=23
/ip dns
set allow-remote-requests=yes mdns-repeat-ifaces=lo servers=8.8.8.8,1.1.1.1
/ip dns static
add address=172.16.0.1 comment=defconf name=router.lan type=A
/ip firewall address-list
add address=192.168.0.0/16 list=PrivateNetworks
add address=172.16.0.0/12 list=PrivateNetworks
add address=10.0.0.0/8 list=PrivateNetworks
add address=172.16.1.1-172.16.1.250 list=DIT
add address=172.16.0.1-172.16.0.250 list=OtherLAN
/ip firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment=\
"defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related hw-offload=yes
add action=accept chain=forward comment=\
"defconf: accept established,related, untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=drop chain=forward comment=\
"defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
connection-state=new in-interface-list=WAN
/ip firewall mangle
add action=mark-routing chain=prerouting comment="Out Via ICUK" disabled=no \
dst-address-list=!PrivateNetworks in-interface-list=LAN new-routing-mark=\
To-ICUK passthrough=no src-address-list=DIT
add action=mark-routing chain=prerouting comment="Out Via Three" disabled=no \
dst-address-list=!PrivateNetworks in-interface-list=LAN new-routing-mark=\
To-Three passthrough=no src-address-list=OtherLAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface-list=WAN
add action=masquerade chain=srcnat out-interface=ether1
/ip hotspot profile
set [ find default=yes ] html-directory=hotspot
/ip route
add comment=Three disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
192.168.8.1 routing-table=To-Three scope=30 suppress-hw-offload=no \
target-scope=10
add comment=ICUK disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
pppoe-out1 routing-table=To-ICUK scope=30 suppress-hw-offload=no \
target-scope=10
/ipv6 dhcp-client
add comment=Three interface=ether1 request=address
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
/ipv6 firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment="defconf: accept ICMPv6" protocol=\
icmpv6
add action=accept chain=input comment="defconf: accept UDP traceroute" \
dst-port=33434-33534 protocol=udp
add action=accept chain=input comment=\
"defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
udp src-address=fe80::/10
add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=input comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=input comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
add action=accept chain=forward comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=drop chain=forward comment=\
"defconf: drop packets with bad src ipv6" src-address-list=bad_ipv6
add action=drop chain=forward comment=\
"defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
icmpv6
add action=accept chain=forward comment="defconf: accept HIP" protocol=139
add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=forward comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=forward comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
/system clock
set time-zone-name=Europe/London
/system note
set show-at-login=no
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN