Community discussions

MikroTik App
 
Anqual
just joined
Topic Author
Posts: 2
Joined: Wed Mar 02, 2022 11:56 am

Mail server in same network with client

Wed Mar 02, 2022 12:42 pm

Hello,
recently I have replaced clients TP Link router with mikrotik, set up NAT rules acordingly with previous router and now I have following problem.
Client has on premise mail server hosted on synology NAS in his network.
When he is connecting with outlook from outside local network mail works fine, but when he tries it from local network mail client cannot connect.
The client is connected via domain name "mail.xxxxxxxxx.com".

My guess is that all ports related to mail flow are redirected via NAT to the mailserver so the client cannot get response.

Here is my NAT config.

/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
add action=dst-nat chain=dstnat dst-address-type="" dst-port=993 \
in-interface=ether1 protocol=tcp to-addresses=\
10.10.10.10 to-ports=993
add action=dst-nat chain=dstnat dst-address-type="" dst-port=995 \
in-interface=ether1 protocol=tcp to-addresses=\
10.10.10.10 to-ports=995
add action=dst-nat chain=dstnat dst-address-type="" dst-port=587 \
in-interface=ether1 protocol=tcp to-addresses=\
10.10.10.10 to-ports=587
add action=dst-nat chain=dstnat dst-address-type="" dst-port=465 \
in-interface=ether1 protocol=tcp to-addresses=\
10.10.10.10 to-ports=465
add action=dst-nat chain=dstnat dst-address-type="" dst-port=143 \
in-interface=ether1 protocol=tcp to-addresses=\
10.10.10.10 to-ports=143
add action=dst-nat chain=dstnat dst-address-type="" dst-port=25 in-interface=\
ether1 protocol=tcp to-addresses=10.10.10.10 \
to-ports=25
 
Sob
Forum Guru
Forum Guru
Posts: 9119
Joined: Mon Apr 20, 2009 9:11 pm

Re: Mail server in same network with client  [SOLVED]

Thu Mar 03, 2022 4:36 am

You want hairpin NAT, see this: viewtopic.php?t=179343
 
Anqual
just joined
Topic Author
Posts: 2
Joined: Wed Mar 02, 2022 11:56 am

Re: Mail server in same network with client

Mon Mar 07, 2022 11:41 am

You want hairpin NAT, see this: viewtopic.php?t=179343
Thanks man, looks just like what I needed.

Who is online

Users browsing this forum: No registered users and 19 guests