Community discussions

MikroTik App
 
scex
just joined
Topic Author
Posts: 3
Joined: Tue Mar 14, 2006 7:56 pm

two wans and only one for mail

Thu May 15, 2008 1:23 am

Hi, I have two different wan-s and one lan on my MT. I would like to make that all traffic go trough one and only mail (tcp port 25) to go trough second one. I succeed to receive mail ( dst-nat) but how to make that outgoing mail use second wan. First wan is default gateway.
Thanks
 
User avatar
maximan
Trainer
Trainer
Posts: 543
Joined: Sat May 29, 2004 12:10 am
Location: Rio Cuarto, Argentina
Contact:

Re: two wans and only one for mail

Thu May 15, 2008 2:00 am

Just mark routing the smtp tcp dst port 25 and then do a policy routing with this mark


Max
http://mikrotikexpert.com
http://maxid.com.ar
 
scex
just joined
Topic Author
Posts: 3
Joined: Tue Mar 14, 2006 7:56 pm

Re: two wans and only one for mail

Thu May 15, 2008 8:29 am

ok thanks but i need details. on Mangle what chain ? (preruting) Action ? Mark routing ok but passtrough yes or no? I could not make it work. Can you please link me to some tutorial about my problem or just write some settings details. Thanks
 
User avatar
ahmedsaffar76
Member
Member
Posts: 306
Joined: Sun Feb 17, 2008 2:56 pm
Location: Iraq

Re: two wans and only one for mail

Thu May 15, 2008 11:01 pm

ok thanks but i need details. on Mangle what chain ? (preruting) Action ? Mark routing ok but passtrough yes or no? I could not make it work. Can you please link me to some tutorial about my problem or just write some settings details. Thanks
Hi scex ;
yes , first by mangle and prerouting mark the packet for smtp on port 25 passthrough yes .
then by prerouting mark the route for the traffic have packet mark you made before , passthrough no or yes i see it not matter with me .
in firewall Nat add a rule to masqurade the traffic have a route mark you did in mangle
in route add a rule to route the traffic have route mark to the wan you want .
try this and if you need further help write again .
here need to ask you how you determine the wan you receive the mail from ?
Max , what are the ports used by yahoo messenger ?
with best regards .
 
scex
just joined
Topic Author
Posts: 3
Joined: Tue Mar 14, 2006 7:56 pm

Re: two wans and only one for mail

Thu May 15, 2008 11:45 pm

Thank. I will try tomorow to do this.

My site is not hosted local. I have only my mail server local. So on hosting server ( hostnine) with cpanel tools and mx records tools you can redirect mx anywhere. Now with some new Spam roules you will need to make one subdomain ( mail.mydomain.com) and make it with your publik ip A record in hosting provider DNS. now when somebody nslookup your ip it will be mydomain.com and it will not be stoped by some spam roules. Regards
 
User avatar
ahmedsaffar76
Member
Member
Posts: 306
Joined: Sun Feb 17, 2008 2:56 pm
Location: Iraq

Re: two wans and only one for mail

Fri May 16, 2008 12:30 am

Thank. I will try tomorow to do this.

My site is not hosted local. I have only my mail server local. So on hosting server ( hostnine) with cpanel tools and mx records tools you can redirect mx anywhere. Now with some new Spam roules you will need to make one subdomain ( mail.mydomain.com) and make it with your publik ip A record in hosting provider DNS. now when somebody nslookup your ip it will be mydomain.com and it will not be stoped by some spam roules. Regards
Hi ;
while you are running your own mail server try to use this web site to block spammers ip .
http://www.projecthoneypot.org/

with best regards .

Who is online

Users browsing this forum: GoogleOther [Bot], ips and 37 guests