Hi,I need a review for my settings
I have 1 VDSL and 3 4g routers and two lan
10.0.0.0/24 and 10.0.1.0/24
Here is my config
may/29/2024 11:42:00 by RouterOS 6.49.11
software id = YZJ6-GZ46
model = 2011iL
serial number = 7DCF09B2311D
/interface ethernet
set [ find default-name=ether1 ] name=ether1_vdsl_468
set [ find default-name=ether2 ] name=ether2_4g_
set [ find default-name=ether3 ] name=ether3_4g_474
set [ find default-name=ether4 ] name=ether4_4g
set [ find default-name=ether9 ] name=ether9_lan_Acc
set [ find default-name=ether10 ] name=ether10_lan
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp_pool1 ranges=10.0.1.2-10.0.1.250
add name=dhcp_pool3 ranges=10.0.0.2-10.0.0.250
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=ether9_lan_Acc name=dhcp1
add address-pool=dhcp_pool3 disabled=no interface=ether10_lan name=dhcp2
/ip neighbor discovery-settings
set discover-interface-list=!dynamic
/interface detect-internet
set detect-interface-list=all
/ip address
add address=10.0.1.1/24 interface=ether9_lan_Acc network=10.0.1.0
add address=10.0.0.1/24 interface=ether10_lan network=10.0.0.0
/ip dhcp-client
add add-default-route=no disabled=no interface=ether1_vdsl_468
add add-default-route=no disabled=no interface=ether3_4g_474
add add-default-route=no disabled=no interface=ether4_4g
add add-default-route=no disabled=no interface=ether2_4g_
/ip dhcp-server network
add address=10.0.0.0/24 dns-server=
10.0.0.1,8.8.8.8,8.8.4.4,62.240.110.198,62.240.110.197 gateway=10.0.0.1
add address=10.0.1.0/24 dns-server=
10.0.1.1,8.8.8.8,8.8.4.4,62.240.110.198,62.240.110.197 gateway=10.0.1.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip firewall mangle
add action=accept chain=prerouting dst-address=192.168.0.0/24 src-address=
10.0.1.0/24
add action=accept chain=prerouting dst-address=192.168.1.0/24 src-address=
10.0.1.0/24
add action=accept chain=prerouting dst-address=192.168.2.0/24 src-address=
10.0.1.0/24
add action=accept chain=prerouting dst-address=192.168.3.0/24 src-address=
10.0.1.0/24
add action=accept chain=prerouting dst-address=192.168.0.0/24 src-address=
10.0.0.0/24
add action=accept chain=prerouting dst-address=192.168.1.0/24 src-address=
10.0.0.0/24
add action=accept chain=prerouting dst-address=192.168.2.0/24 src-address=
10.0.0.0/24
add action=accept chain=prerouting dst-address=192.168.3.0/24 src-address=
10.0.0.0/24
add action=accept chain=prerouting dst-address=10.0.1.0/24 src-address=
10.0.0.0/24
add action=accept chain=prerouting dst-address=10.0.0.0/24 src-address=
10.0.1.0/24
add action=mark-connection chain=prerouting dst-address-type=!local
in-interface=ether10_lan new-connection-mark=VDSL_1 passthrough=yes
per-connection-classifier=both-addresses-and-ports:4/0 src-address-list=
""
add action=mark-connection chain=prerouting dst-address-type=!local
in-interface=ether10_lan new-connection-mark=4g_1 passthrough=yes
per-connection-classifier=both-addresses-and-ports:4/1 src-address-list=
""
add action=mark-connection chain=prerouting dst-address-type=!local
in-interface=ether10_lan new-connection-mark=4g_2 passthrough=yes
per-connection-classifier=both-addresses-and-ports:4/2 src-address-list=
""
add action=mark-connection chain=prerouting dst-address-type=!local
in-interface=ether10_lan new-connection-mark=4g_0 passthrough=yes
per-connection-classifier=both-addresses-and-ports:4/3 src-address-list=
""
add action=mark-connection chain=prerouting dst-address-type=!local
in-interface=ether9_lan_Acc new-connection-mark=VDSL_1 passthrough=yes
per-connection-classifier=both-addresses-and-ports:4/0 src-address-list=
""
add action=mark-connection chain=prerouting dst-address-type=!local
in-interface=ether9_lan_Acc new-connection-mark=4g_1 passthrough=yes
per-connection-classifier=both-addresses-and-ports:4/1 src-address-list=
""
add action=mark-connection chain=prerouting dst-address-type=!local
in-interface=ether9_lan_Acc new-connection-mark=4g_2 passthrough=yes
per-connection-classifier=both-addresses-and-ports:4/2 src-address-list=
""
add action=mark-connection chain=prerouting dst-address-type=!local
in-interface=ether9_lan_Acc new-connection-mark=4g_0 passthrough=yes
per-connection-classifier=both-addresses-and-ports:4/3 src-address-list=
""
add action=mark-routing chain=prerouting connection-mark=VDSL_1 in-interface=
ether10_lan new-routing-mark=to_VDSL_1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=4g_1 in-interface=
ether10_lan new-routing-mark=to_4g_1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=4g_2 in-interface=
ether10_lan new-routing-mark=to_4g_2 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=4g_0 in-interface=
ether10_lan new-routing-mark=to_4g_0 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=VDSL_1 in-interface=
ether9_lan_Acc new-routing-mark=acc_to_VDSL_1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=4g_1 in-interface=
ether9_lan_Acc new-routing-mark=acc_to_4g_1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=4g_2 in-interface=
ether9_lan_Acc new-routing-mark=acc_to_4g_2 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=4g_0 in-interface=
ether9_lan_Acc new-routing-mark=acc_to_4g_0 passthrough=yes
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1_vdsl_468
add action=masquerade chain=srcnat out-interface=ether2_4g_
add action=masquerade chain=srcnat out-interface=ether4_4g
add action=masquerade chain=srcnat out-interface=ether3_4g_474
add action=masquerade chain=srcnat disabled=yes src-address=10.0.0.0/24
add action=masquerade chain=srcnat disabled=yes dst-address=10.0.0.0/24
add action=masquerade chain=srcnat disabled=yes dst-address=10.0.1.0/24
add action=masquerade chain=srcnat disabled=yes src-address=10.0.1.0/24
/ip route
add check-gateway=ping distance=1 gateway=192.168.1.1 routing-mark=to_VDSL_1
add check-gateway=ping distance=3 gateway=192.168.2.1 routing-mark=to_4g_1
add check-gateway=ping distance=4 gateway=192.168.3.1 routing-mark=to_4g_2
add check-gateway=ping distance=2 gateway=192.168.0.1 routing-mark=to_4g_0
add check-gateway=ping distance=1 gateway=192.168.1.1 routing-mark=
acc_to_VDSL_1
add check-gateway=ping distance=3 gateway=192.168.2.1 routing-mark=
acc_to_4g_1
add check-gateway=ping distance=4 gateway=192.168.3.1 routing-mark=
acc_to_4g_2
add check-gateway=ping distance=2 gateway=192.168.0.1 routing-mark=
acc_to_4g_0
/system clock
set time-zone-name=Africa/Cairo
/system ntp client
set enabled=yes
IP—Settings
Turn Allow Fast Path Off(Uncheck Box)
anav
June 23, 2024, 10:58pm
3
Cannot help your config is missing 192.168.0.0-192.168.3.0 lan subnets… I see them in mangling but no clue what they are.
Are you saying that all your WANs are private IPs?
Or are they all dynamic and public but you are simply showing them as private???
Until the WAN situation is sorted out, unable to assist.
Also which ones are primary, as we will need an order at least for if anything else highest throughput to lowest input
( so for each WAN up /down speeds )
I’m behind routers and I use dhcp client for ports connected to routers ,I would like to favour 192.168.1.1
Thanks ,I modified my settings, but doesn’t fast path means faster internet?
mkx
June 24, 2024, 8:45am
6
It does … when configuration is pretty simple.
anav
June 24, 2024, 2:17pm
7
(1) /interface detect-internet
set detect-interface-list=NONE
(2) MISSING required table main routes for all WANs.
/ip route
add check-gateway=ping distance=1 dst-address=0.0.0.0/0 gateway=192.168.1.1 table=main comment=VDLS1
add check-gateway=ping distance=2 dst-address=0.0.0.0/0 gateway=192.168.0.1 table=main comment=to_4g_0
add check-gateway=ping distance=3 dst-address=0.0.0.0/0 gateway=192.168.2.1 table=main comment=to_4g_1
add check-gateway=ping distance=4 dst-address=0.0.0.0/0 gateway=192.168.3.1 table=main comment=to_4g_2
next one Set of Special Table Routes.
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_VDSL_1
add dst-address=0.0.0.0/0 gateway=192.168.0.1 routing-mark=to_4g_0
add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_4g_1
add dst-address=0.0.0.0/0 gateway=192.168.3.1 routing-mark=to_4g_2
Prior to mangling need to use interface lists
/interface list
add name=WAN
add name=LAN
/interface-list-members
add ether9_lan list=LAN
add ether10_lan list=LAN
Now we can mangle efficiently.
/ip firewall mangle
add action=mark-connection chain=prerouting connection-mark=no-mark
dst-address-type=!local in-interface-list=LAN new-connection-mark=VDSL_1
per-connection-classifier=both-addresses-and-ports:4/0 passthrough=yes
+++++++++
add action=mark-connection chain=prerouting connection-mark=no-mark
dst-address-type=!local in-interface-list=LAN new-connection-mark=4g_0
per-connection-classifier=both-addresses-and-ports:4/1 passthrough=yes
+++++
add action=mark-connection chain=prerouting connection-mark=no-mark
dst-address-type=!local in-interface-list=LAN new-connection-mark=4g_1
per-connection-classifier=both-addresses-and-ports:4/2 passthrough=yes
+++++++++++
add action=mark-connection chain=prerouting connection-mark=no-mark
dst-address-type=!local in-interface-list=LAN new-connection-mark=4g_2
per-connection-classifier=both-addresses-and-ports:4/3 passthrough=yes
Now to attach routing to the traffic.
add action=mark-routing chain=prerouting connection-mark=VDSL_1
new-routing-mark=to_VDSL_1 passthrough=no
add action=mark-routing chain=prerouting connection-mark=4g_0
new-routing-mark=to_4g_0 passthrough=no
add action=mark-routing chain=prerouting connection-mark=4g_1
new-routing-mark=to_4g_1 passthrough=no
add action=mark-routing chain=prerouting connection-mark=4g_2
new-routing-mark=to_4g_2 passthrough=no
The questions that needs to be answered concern other possible traffic ??
a. does lan9 need to talk to lan10 or lan10 to l an9 ???
b. Is there any port forwarding ( external to any of the WANs ) port forwarded to mikrotik and then port forwarded to lan9 or lan10 ??
c. Is there any VPN ( external to the WANs) port forwarded to the mikrotik itself?
d. Are there any users that should go out only a specific WAN??
anav
June 24, 2024, 2:19pm
8
IP Settings:
RP filter set to LOOSE
TCP syn cookies NOT CHECKED
ALLOW FAST PATH NOT CHECKED
(1) /interface detect-internet
set detect-interface-list=NONE
(2) MISSING required table main routes for all WANs.
/ip route
add check-gateway=ping distance=1 dst-address=0.0.0.0/0 gateway=192.168.1.1 table=main comment=VDLS1
add check-gateway=ping distance=2 dst-address=0.0.0.0/0 gateway=192.168.0.1 table=main comment=to_4g_0
add check-gateway=ping distance=3 dst-address=0.0.0.0/0 gateway=192.168.2.1 table=main comment=to_4g_1
add check-gateway=ping distance=4 dst-address=0.0.0.0/0 gateway=192.168.3.1 table=main comment=to_4g_2
next one Set of Special Table Routes.
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_VDSL_1
add dst-address=0.0.0.0/0 gateway=192.168.0.1 routing-mark=to_4g_0
add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_4g_1
add dst-address=0.0.0.0/0 gateway=192.168.3.1 routing-mark=to_4g_2
Prior to mangling need to use interface lists
/interface list
add name=WAN
add name=LAN
/interface-list-members
add ether9_lan list=LAN
add ether10_lan list=LAN
Now we can mangle efficiently.
/ip firewall mangle
add action=mark-connection chain=prerouting connection-mark=no-mark
dst-address-type=!local in-interface-list=LAN new-connection-mark=VDSL_1
per-connection-classifier=both-addresses-and-ports:4/0 passthrough=yes
+++++++++
add action=mark-connection chain=prerouting connection-mark=no-mark
dst-address-type=!local in-interface-list=LAN new-connection-mark=4g_0
per-connection-classifier=both-addresses-and-ports:4/1 passthrough=yes
+++++
add action=mark-connection chain=prerouting connection-mark=no-mark
dst-address-type=!local in-interface-list=LAN new-connection-mark=4g_1
per-connection-classifier=both-addresses-and-ports:4/2 passthrough=yes
+++++++++++
add action=mark-connection chain=prerouting connection-mark=no-mark
dst-address-type=!local in-interface-list=LAN new-connection-mark=4g_2
per-connection-classifier=both-addresses-and-ports:4/3 passthrough=yes
Now to attach routing to the traffic.
add action=mark-routing chain=prerouting connection-mark=VDSL_1
new-routing-mark=to_VDSL_1 passthrough=no
add action=mark-routing chain=prerouting connection-mark=4g_0
new-routing-mark=to_4g_0 passthrough=no
add action=mark-routing chain=prerouting connection-mark=4g_1
new-routing-mark=to_4g_1 passthrough=no
add action=mark-routing chain=prerouting connection-mark=4g_2
new-routing-mark=to_4g_2 passthrough=no
The questions that needs to be answered concern other possible traffic ??
a. does lan9 need to talk to lan10 or lan10 to l an9 ???
b. Is there any port forwarding ( external to any of the WANs ) port forwarded to mikrotik and then port forwarded to lan9 or lan10 ??
c. Is there any VPN ( external to the WANs) port forwarded to the mikrotik itself?
d. Are there any users that should go out only a specific WAN??
May Allah Bless you,I really appreciate your effort ,just for learning purpose ,you made interfacelist Lan in order not to duplicate settings as i did before ,am i right?
what is the the problem with not writing dst-address=0.0.0.0/0 in check gateway?
yes both Lans talks to each other or at least 10.0.1.0/24 should be able to acess 10.0.0.0/24 but not vice versa but even if they could it’s not a problem
no other setting ,i saparate each lan users using switches so that each lan is on the same switch
anav
June 24, 2024, 11:36pm
11
(1) Correct, there is no need to have two settings, one for each subnet. Use of interface lists simplifies.
(2) I always write the config as though I am talking through the config.
If will be shown by the config without the dst-address=0.0.0.0/0 I believe, and thats fine.
(3) Good, this is very important because currently the mangling will not allow traffic between the subnets so we will fix that
We are simply ensuring the traffic in both directions does not get trapped by mangles and not applying any kind of firewall thinging in mangles.
USE Firewall rules forward chain to only allow 10.0.1.0/24 to reach 10.0.0.0/24 and not the reverse.
PRIOR to the other mangle rules put these ones FIRST!
/ip firewall mangle
add action=accept chain=prerouting dst-address=10.0.0.0/24 src-address=10.0.1.0/24
add action=accept chain=prerouting dst-address=10.0.0.0/24 src-address=10.0.1.0/24
You should be intuitively able to see that if one had many LAN subnets or VLANS, an address list would be a decent approach
Let say 5 out of 6 subnets needed to talk to each other. Efficient rule would be
add action=accept chain=prerouting dst-address-list=LANCrossTalk src-address-list=LANCrossTalk.
WHere
/ip firewall address-list
add address=subnet1 list=LANCrossTalk
add address=subnet2 list=LANCrossTalk
add address=subnet3 list=LANCrossTalk
add address=subnet4 list=LANCrossTalk
etc…
++++++++++++++++++++++++++++++++++++++++++++++++
Allah has nothing to do with it LOL. Nor does Jesus or Buddah, etc… for that matter. It is arrogant to assume ones god is the correct god and even worse not to accept that other people have different faiths or no faith and be respectful and accepting of that. When you can be respectful and accepting of others differences, you will be at peace with yourself and whatever deity you think you need.
Any other thoughts are anti-social and anti-human and have no place in a non-violent free society.
People can be helpful and kind without religion as a crux.
(1) Correct, there is no need to have two settings, one for each subnet. Use of interface lists simplifies.
(2) I always write the config as though I am talking through the config.
If will be shown by the config without the dst-address=0.0.0.0/0 I believe, and thats fine.
(3) Good, this is very important because currently the mangling will not allow traffic between the subnets so we will fix that
We are simply ensuring the traffic in both directions does not get trapped by mangles and not applying any kind of firewall thinging in mangles.
USE Firewall rules forward chain to only allow 10.0.1.0/24 to reach 10.0.0.0/24 and not the reverse.
PRIOR to the other mangle rules put these ones FIRST!
/ip firewall mangle
add action=accept chain=prerouting dst-address=10.0.0.0/24 src-address=10.0.1.0/24
add action=accept chain=prerouting dst-address=10.0.0.0/24 src-address=10.0.1.0/24
You should be intuitively able to see that if one had many LAN subnets or VLANS, an address list would be a decent approach
Let say 5 out of 6 subnets needed to talk to each other. Efficient rule would be
add action=accept chain=prerouting dst-address-list=LANCrossTalk src-address-list=LANCrossTalk.
WHere
/ip firewall address-list
add address=subnet1 list=LANCrossTalk
add address=subnet2 list=LANCrossTalk
add address=subnet3 list=LANCrossTalk
add address=subnet4 list=LANCrossTalk
etc…
++++++++++++++++++++++++++++++++++++++++++++++++
Allah has nothing to do with it LOL. Nor does Jesus or Buddah, etc… for that matter. It is arrogant to assume ones god is the correct god and even worse not to accept that other people have different faiths or no faith and be respectful and accepting of that. When you can be respectful and accepting of others differences, you will be at peace with yourself and whatever deity you think you need.
Any other thoughts are anti-social and anti-human and have no place in a non-violent free society.
People can be helpful and kind without religion as a crux.
i wasn’t trying to convert the post to religious , i was asking good for you ,anyway , my beliefs are on the contrary of that ,and religion is a core part of my living ,i will not argue but i believe that every thing depends on Allah ,anyway thanks for help
Thank you for the kind appreciation you wish to express, I will take it directly from you (vice through a third party ).