This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NAT confusion

I come from a Cisco Pix background and I'm trying to configure an ASG. 

The only problem I am having is that when I setup nat for an email server. In cisco syntax, I would setup a static mapping between inside and outside address, then an access list to permit outside traffic to the inside. 

So, on the ASG - I did setup a DNAT and packet filter and  - at least on the inbound - it works as I need. However, when the server makes connections to  other outside mail server, it doing so via the interface IP and not the "inbound" ip address setup in dnat. 

I'm missing something obviously.  any pointers to set me stright would be greatly appreciated.

Thank, Tony.


This thread was automatically locked due to age.
Parents Reply Children
  • So checking into Astaro Knowledgebase found article:
    284238 Email MX IP verification issues


    Product Version: Astaro Security Gateway V7
     
    Symptom:
    When using multiple IP addresses on the external interface in combination with the SMTP proxy of Astaro Security Linux, sometimes outgoing mail is bounced back to the sender with the recipients location complaining that sender verify failed or DNS records do not match correctly for the sending domain.
    Cause:
    Usually the LAN or DMZ that contains the mail server has a masquerading rule applied. If the mail server's MX record is resolving to one of the aliased addresses, this means that the mail is being delivered to say 1.1.1.7 for the domain, but outgoing mail is being masqueraded to the main external address of the firewall, and as such appears to come from 1.1.1.5, which causes the outgoing IP address of .5 not to match with the .7 address located in the MX record. This inconsistency can trigger various implementations of Sender Address Verification (SAV) at the recipient end, which requires the MX record match the sending IP address.

    Additional issue can arise when using outbound scanning or transparent smtp proxy setting.  In this case the ASG SMTP proxy will always use the public interface address.
    Resolution:
    The solution here is to add an SNAT rule to translate outgoing SMTP traffic from the mail server to the correct alias so the MX record matches.

    1) Go to Network Security>>NAT>>DNAT/SNAT
    2) Select New NAT rule and add a rule name 
    3) For the 'Traffic Source' pick the definition for your internal mail server.
    4) For the 'Traffic Destination', select 'Any'.
    5) Service is 'SMTP'.
    6) Select NAT mode: SNAT(Source)
    7) For the 'Source' select the Alias Interface for the public MX IP address
    8) Save and toggle the rule on.

    For outbound scanning or transparent proxy enabled:
    1) Go to Network Security>>NAT>>DNAT/SNAT
    2) Select New NAT rule and add a rule name 
    3) For the 'Traffic Source' pick the definition for your public interface External(Address)
    4) For the 'Traffic Destination', select 'Any'.
    5) Service is 'SMTP'.
    6) Select NAT mode: SNAT(Source)
    7) For the 'Source' select the Alias Interface for the public MX IP address
    8) Save and toggle the rule on.

    Now with this rule, outgoing SMTP traffic from your internal mail server will have it's source changed so that it appears to come from the aliased IP address instead of the main external IP, thus making a match to the address in the MX record. You may repeat this for multiple mail servers using SNAT to multiple aliases as needed. 

    Another solution that may be used is to simply edit the MX record of the affected domains to point to the main ip of the Firewall which removes the need to do SNAT altogether. In environments that must maintain separate MX addresses for different domains, then SNAT is the solution to use.
  • Agreed, Cath, but don't you agree that the "standard" approach when using the SMTP Proxy is to have the public IP of the Astaro be the MX-record address and to assign 'Additional Addresses' for other uses?

    Cheers - Bob
  • Depends on how you want to configure your email domain for setup, also you may be converting from another system where the IPs pointed back to the ASG must be additional addresses otherwise changing all the external reference points may take too long.

    For setting up a new domain and server from scratch setting the default ASG address would certainly make the most sense.