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

Help configuring DMZ Mail Server with Web mail

My Network configuration is as follows

The firewall (ASL 4.0) has three NIC's
The first NIC is connected to a Router which connects to the Internet
The second NIC connects to a DMZ
The third NIC connects to the Internal network

I have two public IP's of which one is used as the Mail Server IP. I have a registered sub domain that is used for checking mails. This sub domain has one MX record so that the mails are delivered to my Mail Server.

The Public IP's  are named as External_Mail_Interface and External_Interface

The DMZ consists of a postfix mail server and a machine that runs Symantec Anti Virus for Gateways (AV Server)

My requirements are :
a. The mail server which runs web mail needs to be accessed from the internet as well as from the internal network. Web mail should be accessed from the internet only through the mail IP.
b. All SMTP mails that come in should route through the AV Server. The AV server then delivers all mail to the mail Server after virus scanning. 
c. The AV server should be able to pick up live updates from the internet.
d. The internal network when sending mails should go through the AV Server. The internal network should be allowed POP3 and IMAP to the mail server.

Currently I have pulled the plug on the AV Server. 

My NAT rules are 
a. Source is Internal Network - > Any Destination - > Change Source to External_Int
b. Any Source - > destination is External mail Int - > Change Source to Ext Mail Int - > Change Destination to Mail Server
c. Source is Mail Server -> Any Destination - > Change Source to Ext Mail Int

The packet filter rules in given order are
a. Internal_Network__ - > any - > any -> Allow
b. Any -> Mail_Group -> Mail Server -> Allow
c. Mail Server -> Mail_Group -> Any -> Allow

where Mail_group is HTTP + HTTPS + DNS + SMTP + IMAP + POP3

The above configuration works fine as long as the AV server does not come into the network.

I have tried a lot of things for the last two weeks to route mails through the AV server. At one point I was able to send mails from the Internet through the AV server. But then I was told that the web mail was not working. Hence I rolled back the entire thing.

I need help on setting up the configuration so that the AV server comes up. My questions are

1. What should the NAT rules be changed to, so that the above mentioned requirements are met ? 
2. What should the packet filter rules be ?

Any help is greatfully accepted.

  


This thread was automatically locked due to age.
  • No, don't change the DNAT rule!
    HTTP will stay HTTP, and HTTPS will remain HTTPS.

    I was asking about a forced redirection to HTTPS since using web mail would not be advisable in HTTP for security reasons (but people are technically challenged or lazy and they don't want to have to initially enter an HTTPS address...)
      
  • Thanks for all the help you gave me. I have now set up the ASL with the rules I mentioned. Everything is working as expected. Now I guess I need to tighten up all the rules. I have implemented the rules as mentioned in my previous post. I still have the Any Allow rule. 

    What would you suggest so that, the rules are as tight as they possibly can be.  
  • That's all a function of the culture at your shop.

    If you have the backing of management to make things as secure as possible, start by allowing outbound DNS, HTTP, HTTPS (unless you're using the respective proxies, in which case you can even dispense with those rules). Do an inventory of your apps and see if they need special port connectivity to the Internet (after hours, run each app, see if it fails, look at the log to see what it needs). Warn the users that tighter controls are being put in effect (at the slowest time of the day/week!), and be on call to quickly add rules as needed.

    The biggest bain of firewall administrators now is being strong-armed to permit chat and P2P software. I read on another post recently that the HTTP proxy in version 5 can block connects; it's unclear to me as of yet if it will control everything.

    There are chat proxy servers you can use (Akonix is one) to allow the chatting but stop hazardous content transfers (and chat software exploits too). If they force you to support chat, I would strongly recommend that you get one of these.

    As for P2P, I would discourage it. You could make your company liable for IP theft, and since the latest specs are generally kept secret, it is next to impossible to get software that regulates it to be 'safe' (e.g., to block trojans, worms, etc.).

    Hot security tip: If you're an IE shop, look at IEAK.
    I am looking forward to if/when Opera has centralized and granular controls like it too...
  • I have a strange problem now. The packet filter that was working on Friday is now giving me a very difficult problem. My mails are now not getting delivered. 

    The AV server log says it has received the mail (any mail that has been sent from the internet or from the local LAN) and forwarded the same to the mail server. However this mail is not to be seen anywhere. Basically mail is not going out or coming in. The worst part is that mail is not delivering even to local mail boxes. I restored my oldest Firewall backup(My first post) and mails are now delivering in and out.  What could be the problem? 

    I have configured the AV server to use the mail server as the nameserver. I noticed a lot of errors in the Windows Application log of the AV server, saying "Malformed DNS". What does this mean.

    Also I had a backup of the ASL just before I put in these rules. When I try to restore that, the system asks for a passPhrase. What is this supposed to be ?  
  • If you didn't give it one, try none. Backups are quite reliable on Astaro, provided you are using a browser which has been patched (e.g., I've seen backups fail with IE 5.0, but never fail with IE 5.5 SP2). What browser are you using? (include version)

    Is you mail server a name server? I doubt that (maybe it is, but I doubt it); hence, the error messages for DNS makes sense.

    When you configure the AV server, is there a place on its interface to indicate the IP address of the internal mail server?

    What type of mail server are you using?
         
  • My browser is IE 6.0. ASL asks for a passPhrase only for some backups, not all of them.

    My mail server is SuSE Linux. (Email Server II). As you say I am not sure about it being a name server. But I was able to do name resolution on the AV server by using the mail server as a DNS.

    The AV Server has a section where you enter the Mail Server name or IP, to which it forwards mails after scanning. That is given correctly. I have one doubt as too why the mail is not visible anywhere.(I dont get bounced messages either). Is my mail server refusing to relay mails from the AV Server? How do I find out if this is happening?   
  • Do a test from a workstation (or can you telnet from your AV server??):

    See Re: SMTP outgoing mail

    If the AV server is not delivering outbound mail and knows by IP address where the mail should get forwarded, you should not need to specify a DNS, other than for it to locate a patch server; therefore, its DNS should be set to a 'real' DNS server; but for now, try to leave it not filled in (or 127.0.0.1, if it forces you?)

    The only other reason I could think as to why your AV might need a DNS server is if it generates seperate reply messages (which are not in vogue anymore, since that tends to make a bad situation worse, what with all the spoofing and false alerts going on these days...)
  • I have checked the logs of the AV server and found the following error - Message Delivery Attempt Failed. 

    I have removed the DNS entry as well from the AV Server. I wonder if any of my packet filter rules are wrong. I tried a telnet on port 25 to the Mail server and the telnet connects to the AV Server. So I guess that part of the rule is OK. How do I now test the second part(From AV to Mail). Is a telnet from AV to Mail Server on port 25 sufficient ? I have done this and got a proper response as well.

    My allowed networks in the Mail Server are the DMZ, Internal N/w and the Ext Mail Interface.

    If I send mails using the web interface, i see that the mails are going out. So that means that the Mail Server to External world rule also works fine.  
  • OK, a telnet from AV to the mail works; now compose a test message in telnet and see what happens (if you make a typo, just start over; try to be careful...)
      
  • I did as you did. I did a telnet from the internal network to the mail server. It connected to the AV server. I entered all the SMTP commands till I got the message accepted reply. 

    But what I saw in the AV server was the same error(Message Delivery Attempt Failed  ).