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

Email Server Behind Sophos UTM 9 (Essentials)

Hi All,
I must join the large number of converts to Astaro/Sophos who are having trouble with NAT (or so I believe). 

I am running the Virtual Appliance on the same physical server that I am running my virtual email server on if that makes a difference.

I defined my email server during setup.
Zimbra Mail Server
Host
192.168.x.x


I created an alternate external IP address to connect to my email server like so many of the posts and tutorials suggested.

I created a DNAT
Rule Type: DNAT (Destination)
For Traffic From: Any
Using Service: Email Messaging (Also attempted to simply allow any)
Going To: External Alternate IP

Changing the Destination To: Zimbra Mail Server
And the Service To: blank


I have tried checking off the Auto Create rule line and tried not checking it

I am familiar with basic networking and port forwarding on Routers and simpler firewalls like Smoothwall Express, but after 3 days, Astaro/Sophos UTM has kicked my rear. I would like to look at subscribing to some of the features, but right now I cannot get it to function with what I have. Any help would be greatly appreciated. 

PS I don't mind reading and learning more about this so I can understand it better, but I have searched for 3 days online and on this forum, and have not found anything like my situation, even though it seems simple.


This thread was automatically locked due to age.
  • first you need the follwoing:

    for UTM:  one shared nic for internal network access and one unshared physical nic for wan
    for mail: shared nic for intern network access

    here's the nat rule you need:
    traffic source: any
    traffic service: I have a group here called zimbra services which is https, imapssl, smtpssl, ssh, webmin, zimbra admin

    traffic desitination: WAn network
    NAt mode : desitination
    Destination: fbc mail(which is 192.168.x.x)
    automatic firewall rule
  • 1 You must have that alternate IP from your ISP and then configure like alternate in external and point the smtp.yourdomain.com to that ip in ns-servers
    2 if you have only firewall subscription and not "Email Protection" you are doing wrong NAT
    In DNAT you can't leave service blank1:1 NAT (Whole Networks) will fits to your needs if you use one IP only for the mail-server with all the services
  • @William
    I do currently have 2 physical NIC's, one for external WAN, and one for Internal. I am able to get Internet, so the basic setup is working.

    I have almost that exact rule. I checked all zimbra ports against the email messaging group. It had almost all, and I added the two additional ports that were missing. Different names, but the same ports. The other settings are exactly what I have. Still no email access.

    @oldeda
    That might be it, as I do not have the email protection yet. The DNAT made sense to me, but the 1:1 NAT does not. Could I in theory do a new DNAT for each port (Since the destination service may not be a group)? Or could you give me an example of a 1:1 NAT?

    I have 1 internal network, which is where the email server is. I have 5 static IP's from my ISP. Currently the UTM has an IP of x.x.x.102. My DNS is pointing my mail at x.x.x.101.

    Thanks.
  • seems that you are ok except the DNAT rule, DNAT is strict with service destination. You have to do a rule for any single service that Zimbra will answer like
    source>any, sevice>smtp to external x.x.x.101 Detination> smtp> to Zimbra. atomatic firewall rule checked

    1:1NAT is for any port going on 101 change to Zimbra (no need to configure ports), but not recommended because the server will face the internet without protection
  • First, let me apologize it took so long to reply. 

    Second, we have some progress. I finally created a DNAT rule for each port that Zimbra does/might use. All were created with automatic firewall rule checked off.

    All DNAT rules are formatted like this...

    Rule Type: DNAT
    For Traffic From: Any
    Using service: %a port listed by zimbra%
    Going to: External WAN x.x.x.101
    Change Destination to: Zimbra Email Server
    and service to: %same port listed above%

    I did that for every port listed on zimbra's wiki. I am now able to access the login page and view emails from outside the network (was not able to send or recieve within the 10 minutes following the creation of the rules.) I am also unable to access anything from inside the network. Am I going to have recreate all those rules going to the internal IP as well?
  •  I am also unable to access anything from inside the network. Am I going to have recreate all those rules going to the internal IP as well?


    If you are talking about from inside going out (like web browsing, etc.) you'll need to add a Masquerade rule (the "other" NAT Tab) and a FIrewall full allowing outbound access.  The Sophos UTM, like many other Firewall / Security devices, is a default drop type device, you have to add rules to allow traffic to go where you want it to go.
  • The masquerading doesn't seem to have much to change?

    Network - I can set to whatever
    Position - Bottom or Top
    Interface - Internal or External
    User Address - > is the only option. 

    How would I set that up? Would it go from the mail server to the external? or from the internal to the external additional ip?

    I also tried creating snat rules for all the ports. Shortly after I did that, I received an email to a yahoo account that I had sent from this server. However, I no longer had access to the login. I disabled all those for now, and once again can access the emails through webmail from the outside, but cannot send or receive.
  • Hi, Vin, and welcome to the User BB!

    In general, you should leave a field blank in a NAT rule if you're not changing it (the Service in this case).  That's a good habit, and it's essential when the traffic selector includes a service group.

    Instead of several NAT rules, I would recommend a single one like 'DNAT : Any -> {group of Zimbra services} -> External 
    • Never create a Host/Network definition bound to a specific interface; always leave them with 'Interface: >'.
    • In a DNAT traffic selector, you normally never will have a  Host/Network definition that you manually created.  Always (well, almost) use the "(Address)" object created by WebAdmin when the interface or Additional Address was defined.[/LIST]

      Masquerading is probably 'Internal (Network) -> External' with the primary address for general access.  If you want the mail server to send on the Email address, you can put another masq rule just for it like 'Zimbra Server -> External on Email'.  Another alternative is to add a NAT rule like 'SNAT : Zimbra Server -> Any -> Internet : from External  (Address)'.

      Cheers - Bob
      "> (Address) : to Zimbra Server'.  Note that I assumed you put an Additional Address (.101) called "Email" on the External interface.

      There are two common mistakes that people make here:
      [LIST=1]
    • Never create a Host/Network definition bound to a specific interface; always leave them with 'Interface: >'.
    • In a DNAT traffic selector, you normally never will have a  Host/Network definition that you manually created.  Always (well, almost) use the "(Address)" object created by WebAdmin when the interface or Additional Address was defined.
    [/LIST]

    Masquerading is probably 'Internal (Network) -> External' with the primary address for general access.  If you want the mail server to send on the Email address, you can put another masq rule just for it like 'Zimbra Server -> External on Email'.  Another alternative is to add a NAT rule like 'SNAT : Zimbra Server -> Any -> Internet : from External  (Address)'.

    Cheers - Bob
  • Hi BAlfson,
    I had originally done it with the group, but tried seperating it out to see if it made a difference. I deleted all of them and recreated the single one using the group.

    Any --> Email Messaging --> External Mail Address --> Zimbra Email Server

    I do not have the option in the Masquerading section to set it to the mail IP Address? Not sure why.

    I created the SNAT Rule that you said could be an alternative, and am still not having any luck.

    I feel like it is something simple that I am missing, but I have not idea what it is.
  • Are you using V9?


    Cheers - Bob

    Sorry for any short responses!  Posted from my iPhone.