-
Iptables help needed to forward/route emails
Hello gents!
I just setup an email server inside my companys small network. It was an install iredmail.
I turned off iptables on the mail server (192.168.0.3)
I also added iptable rules on the software gateway
eth0 - public (192.168.1.X) DHCP
eth1- private (192.168.0.X) Static DHCP interface
iptables on the gateway are here:
*nat
:PREROUTING ACCEPT [124:8170]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.0.5:80
-A PREROUTING -i eth0 -p tcp -m tcp --dport 9267 -j DNAT --to-destination 192.168.0.3:9267
-A POSTROUTING -o eth0 -j MASQUERADE
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Tue Jun 17 15:22:35 2014
# Generated by iptables-save v1.4.7 on Tue Jun 17 15:22:35 2014
*filter
:INPUT ACCEPT [45:3208]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [24:2576]
-A FORWARD -i eth1 -j ACCEPT
-A FORWARD -o eth1 -j ACCEPT
-A FORWARD -d 192.168.0.5/32 -i eth0 -p tcp -m tcp --dport 80 -j ACCEPT
-A FORWARD -d 192.168.0.3/32 -i eth0 -p tcp -m tcp --dport 9267 -j ACCEPT
COMMIT
And yes I used port 9267 in place of port 25 since im pretty sure my ISP is blocking it
(I have changed it on the mail server master.cf file)
So basically my issue is I cannot receive any emails but can send fine to the outside
I can also send and receive internally.
My MX records on my DNS are :
@ IN MX 10 mail.example.local.
@ 3600 IN TXT "v=spf1 mx mx:mail.example.com -all"
and on Godaddy
Priority
Host
Points To
TTL Actions
1 @ mail.example.local 1 Hour
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|