Community discussions

MikroTik App
 
User avatar
Techsystem
Member
Member
Topic Author
Posts: 337
Joined: Tue Dec 21, 2021 5:12 am

redirect users to another ISP without using Routing rules

Fri Mar 10, 2023 9:04 am

Hello for all Mikrotik people there ...!
so i have two WAN connection -(ISP-1 and ISP-2) and i want to redirect 10 users from my LAN to use ISP-2, is there is a way to do that without
using a routing rule for each one..?
i mean can i put them in a groub or something like that and redirect them in one routing rule instead of built 10 routing rule for each of them...?
any suggestion please..?
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19100
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: redirect users to another ISP without using Routing rules

Fri Mar 10, 2023 1:57 pm

Yes, but then you have to mangle - You create a firewall address list of the 10 people and mangle on that list.
10 people thats only ten rules LOL.

Choice is yours.
 
User avatar
Techsystem
Member
Member
Topic Author
Posts: 337
Joined: Tue Dec 21, 2021 5:12 am

Re: redirect users to another ISP without using Routing rules

Fri Mar 10, 2023 4:09 pm

Yes, but then you have to mangle - You create a firewall address list of the 10 people and mangle on that list.
10 people thats only ten rules LOL.

Choice is yours.
Hello Man..!
lol..
just a hint on how can i achieve this ..
after creating the address list the rule will be like this -(correct me if i am wrong)-
first rule = chain:prerouting ,src add list=isp-2 ,connection mark=no mark , action=mark-connection as ISP-2-people,
second rule=chain:prerouting ,src add list=isp-2 ,connection mark= ISP-2-people , action=mark-routing = ISP-2
you mean like this ..?
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3252
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: redirect users to another ISP without using Routing rules

Fri Mar 10, 2023 4:23 pm

Another technique would be use DHCP leases reservations (or manual IP configuration) to assignment with a specific prefix.
e.g. 192.168.88.64 - 192.168.88.96, then have one /routing/rule for just one src-address of 192.168.88.64/27 that picks a routing table per your desire.

You can then change the /ip/pool to not include those address so they aren't used for new clients, for example 192.168.88.97-192.168.254 would be the pool then. You can use multiple prefix ranges (e.g. small or bigger ones) that do the same thing. Then you can adjust a WAN for a client by changing it's DHCP assignment.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19100
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: redirect users to another ISP without using Routing rules

Fri Mar 10, 2023 5:49 pm

@ammo Shouldn't you be busy building an ARK right now???
Your solution is interesting but what if you have 20 users are they are all from different subnets ! ;-P

@op there are so many resources available to you..................... (anything by the network berg or (MAICT) maher haddad on youtube is good)
viewtopic.php?t=182373

Use the force ( or eyes and brain )
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3252
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: redirect users to another ISP without using Routing rules

Fri Mar 10, 2023 6:07 pm

One problem at a time. If you have one LAN and multiple WANs, you can control the grouping. If you want address-list, I'd agree it's best to do that with mangle – but it is tricky since the firewall is pretty picky on the placement.

More fodder for consideration. Either approach can work.

Shouldn't you be busy building an ARK right now???
Well, somebody still has to build containers for the ark.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19100
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: redirect users to another ISP without using Routing rules

Fri Mar 10, 2023 6:19 pm

Not really,
Its a one line simple mangle rule (plus some route stuff),
The only reason for two simple forward chain rules is to keep using fasstrack for everything else.
DONE!!!!

Do you need lifejackets, Ive heard all the sharks in the pacific are congregating off the shoreline awaiting all the fresh meat thats going to be carried into the ocean......
 
User avatar
broderick
Member Candidate
Member Candidate
Posts: 242
Joined: Mon Nov 30, 2020 7:44 pm

Re: redirect users to another ISP without using Routing rules

Fri Mar 10, 2023 8:15 pm

you mean like this ..?
I used to use this simple setup:

viewtopic.php?t=189379&sid=5ca384efb7af ... c0c2b39823
maybe it can be of any help to you.
of course, you should use an ip list in place of subnets as src-address
Let us know

Who is online

Users browsing this forum: Bing [Bot], Nospam, qatar2022 and 47 guests