Community discussions

 
adrian13
just joined
Topic Author
Posts: 2
Joined: Tue Aug 13, 2019 7:20 am

Mdaemon Mail Server With IP Nat in Mikrotik,,, Help

Tue Aug 13, 2019 10:04 am

Dear All

I want to Configure Mail Server Mdaemon with IP Private ,, 192.168.1.2 and My Mikrotik as Router&Firewall with IP 192.168.1.1 and My IP WAN is 202.24.210.21 and for IP Public MAIL 202.24.210.22..

Ether1 :202.24.210.21
Ether2:192.168.1.1
Mdaemon IP : 192.168.1.2
IP Public for Mail : 202.24.210.22

ISP
|
|
Mikrotik
|
|
Mail Server --- PC1



I Set Mikrotik like this...


01 /ip firewall nat
02 add action=dst-nat chain=dstnat comment="Email server port forwarding" \
03 dst-address=202.24.210.22 dst-port=25 protocol=tcp to-addresses=\
04 192.168.1.2 to-ports=25
05 add action=dst-nat chain=dstnat dst-address=202.24.210.22 dst-port=22 \
06 protocol=tcp to-addresses=192.168.1.2 to-ports=22
07 add action=dst-nat chain=dstnat dst-address=202.24.210.22 dst-port=110 \
08 protocol=tcp to-addresses=192.168.1.2 to-ports=110
09 add action=dst-nat chain=dstnat dst-address= dst-port=143 \
10 protocol=tcp to-addresses=192.168.1.2 to-ports=143
11 add action=dst-nat chain=dstnat dst-address=202.24.210.22 dst-port=443 \
12 protocol=tcp to-addresses=192.168.1.2 to-ports=443
13 add action=dst-nat chain=dstnat dst-address=202.24.210.22 dst-port=465 \
14 protocol=tcp to-addresses=192.168.1.2 to-ports=465
15 add action=dst-nat chain=dstnat dst-address=202.24.210.22 dst-port=587 \
16 protocol=tcp to-addresses=192.168.1.2 to-ports=587
17 add action=dst-nat chain=dstnat dst-address=202.24.210.22 dst-port=993 \
18 protocol=tcp to-addresses=192.168.1.2 to-ports=993
19 add action=dst-nat chain=dstnat dst-address=202.24.210.22 dst-port=995 \
20 protocol=tcp to-addresses=192.168.1.2 to-ports=995


1 /ip dns set servers=8.8.8.8 allow-remote-requests=yes.
2 /ip dns static
2 add address=192.168.1.2 name=mail.mydomain.com

1/ip firewall filter
2 add chain=forward comment="Allowing mail server" dst-port=25 out-interface=ether1 protocol=tcp src-address=192.168.1.2
4 add chain=forward comment="Allowing mail server" dst-address=192.168.1.2 dst-port=25 in-interface=ether1 log=yes protocol=tcp

I set Mail server with dns 192.168.1.1
in Mdaemon I set the domain manager --- host and IP with : mail.mydomain.com
: 192.168.1.2

and My Question is, Why i cannot send and receive mail from my computer and at Mdaemon server always bouncing either It's send and receive
Is My Configuration in Mikrotik Wrong or Missing any rules,, or if any other in this forum can Help me using Mdaemon as mail server with IP NAT in Mikrotik...?

Thanks
 
User avatar
ingdaka
Member Candidate
Member Candidate
Posts: 133
Joined: Thu Aug 30, 2012 3:06 pm
Location: Albania
Contact:

Re: Mdaemon Mail Server With IP Nat in Mikrotik,,, Help

Tue Aug 13, 2019 3:50 pm

You have to configure 202.24.210.22 also in public interface of your router!
Remote request about DNS should not be checked for security, you can get syn flood DDOS attach in your router using port 53!
No need to use static entry on your router!
Src-nat rule need to be setup to show allow mailserver to send mails with his public IP!
Also need to setup masquerade nat rule router at the end of all rules
Ilir Daka
Electronic & Network Engineer
E-mail: ilirdaka@live.com
Mob: +355692982151
WhatsApp: +355692982151
Mikrotik Official Consultant
CCNA | Fortinet NSE3 | MTCRE | MTCSE
 
adrian13
just joined
Topic Author
Posts: 2
Joined: Tue Aug 13, 2019 7:20 am

Re: Mdaemon Mail Server With IP Nat in Mikrotik,,, Help

Wed Aug 14, 2019 12:15 pm

Oke Thanks For you help

Who is online

Users browsing this forum: No registered users and 27 guests