Community discussions

MikroTik App
 
dliebchen
just joined
Topic Author
Posts: 5
Joined: Thu Oct 20, 2016 5:21 pm

Force SMTP through specific gateway

Thu Oct 27, 2016 4:26 pm

Hi,

my setup contains 4 different internet provider. One provider is for usual traffic like browsing and downloading. Another one is for sending/receiving emails. I want all traffic of a specific dst.address to go through a specific gateway but I can't find any ruleset which allows me to do this.
I've allready read http://wiki.mikrotik.com/wiki/Policy_Ro ... erOS_2.9.x

Short:
eth1 = LAN
eth6 = VDSL
eth7 = SDSL

I've created a gateway 0.0.0.0/0 to use eth6 for all traffic. Now I want the traffic to 176.12.12.12 (f.e) to use eth7 for outbound. I was using pfSense till now and all I did was creating a firewall for dst.address 176.12.12.12 and ticking "use gateway blahblah" in extra options. That's it. So how to implement this with ROS?

Best Regards,
Dominik
 
User avatar
cdiedrich
Forum Veteran
Forum Veteran
Posts: 997
Joined: Thu Feb 13, 2014 2:03 pm
Location: Basel, Switzerland // Bremen, Germany
Contact:

Re: Force SMTP through specific gateway

Fri Oct 28, 2016 11:40 am

Accodring to your referenced wiki article I'd do it like this:
/ip firewall mangle add chain=prerouting dst-address=176.12.12.12/32 action=mark-routing new-routing-mark=example passthrough=yes comment="" disabled=no
/ip route add gateway=<gateway from mail-ISP> routing-mark=example disabled=no
/ip route rule add src-address=0.0.0.0/0 table=example action=lookup
-Chris

Who is online

Users browsing this forum: Bing [Bot] and 95 guests