Community discussions

MikroTik App
 
User avatar
anthonws
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 76
Joined: Sat Jan 09, 2016 6:46 pm

Force specific LAN device via ZeroTier

Thu Dec 01, 2022 12:51 am

Hello,

I would like to have your insights on what would be the best way to route a specific client (LAN), that I have connected on a given port of the router, to use a different gateway from the rest of the subnet. Objective is to force only a specific device to exit via ZeroTier, instead of the direct gateway to the Internet.

I guess I could always change on the device IP settings as a last resort, but I'm sure there's a more elegant way of doing it.

Cheers,
anthonws.
 
gotsprings
Forum Guru
Forum Guru
Posts: 2087
Joined: Mon May 14, 2012 9:30 pm

Re: Force specific LAN device via ZeroTier

Thu Dec 01, 2022 2:31 am

Mangle
 
User avatar
anthonws
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 76
Joined: Sat Jan 09, 2016 6:46 pm

Re: Force specific LAN device via ZeroTier

Thu Dec 01, 2022 4:33 pm

Mangle
Thanks for the feedback!

So, a prerouting rule, where source address A, with destination 0.0.0.0/0 and action route to ZT gateway?
 
gotsprings
Forum Guru
Forum Guru
Posts: 2087
Joined: Mon May 14, 2012 9:30 pm

Re: Force specific LAN device via ZeroTier  [SOLVED]

Thu Dec 01, 2022 5:31 pm

Mangle
Thanks for the feedback!

So, a prerouting rule, where source address A, with destination 0.0.0.0/0 and action route to ZT gateway?
No mark
Mark routing
then set Output rule to match that mark and it should go over that feed
 
User avatar
anthonws
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 76
Joined: Sat Jan 09, 2016 6:46 pm

Re: Force specific LAN device via ZeroTier

Fri Dec 02, 2022 2:38 am

Thank you :) All is good! Added a prerouting rule to mark route and then added a manual route for that mark, with the new gateway.
Had to tweak the fasttrack rule to ignore the new mark and get "full speed" (around 70 MBits).
Now on to ZeroTier and how to increase its speed (most probably a more powerful node on the other end :P).
 
gotsprings
Forum Guru
Forum Guru
Posts: 2087
Joined: Mon May 14, 2012 9:30 pm

Re: Force specific LAN device via ZeroTier

Fri Dec 02, 2022 5:52 am

Welcome

Who is online

Users browsing this forum: Bing [Bot], freemannnn, Google [Bot] and 71 guests