Community discussions

MikroTik App
 
dnalor
just joined
Topic Author
Posts: 8
Joined: Tue Mar 25, 2014 7:29 am

Route traffic depending on protocol - How to

Wed Apr 09, 2014 10:52 am

All,

I'd like to route all tcp port 22 (ssh) traffic to go through my second ISP which is dedicated for this specific protocol.
i have a number of destinations that keeps changing, so far i'm routing by destination as such:
add comment="Some meaningful comment" disabled=no distance=10 dst-address=A.B.C.D/32 gateway=MyGw scope=30 target-scope=10
i would like to do the same but protocol based, any suggestion would be appreciated
 
User avatar
c0d3rSh3ll
Long time Member
Long time Member
Posts: 557
Joined: Mon Jul 25, 2011 9:42 pm
Location: [admin@Chile] >

Re: Route traffic depending on protocol - How to

Wed Apr 09, 2014 10:22 pm

You can force any traffic over specific gateway using routing mark in mangle and rouring table something like this:

/ip firewall mangle add chain=prerouting protocol=tcp dst-port=22 in-interface=lan action =mark-routing new-routing-mark=ssh-route

/ip route add routing-mark=ssh-route gateway=your_gateway2

sent from my mobile phone using tapatalk

Who is online

Users browsing this forum: mquan1984 and 132 guests