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

Outgoing SMTP Proxy ONLY | NO Incoming

Hi All,  

I used to be able to configure SMTP Proxy for my LAN to scan Outgoing mails and then the SMTP Proxy -> ISP SMTP Server. 
This is perfect in the 6.x version as no SMTP Ports is opened to external.

Since the 7.x, I have never been able to do that.
The SMTP ports are always open as long as SMTP Proxy is enabled but cannot be used as a relay as I did not configure any domains, I only set my LAN to allow relay. But I do not like the fact port scan shows the port open.

I tried to block manually by setting firewall rules on top to block incoming but it remains open, i think it is some auto rules thus my block rules does not apply.

PORT 25, 465, 587.


I reinstalled 7.402 from Scratch as I could not figure our what I missed and at a stage, I noticed something.

On the Basic Setup Wizard, there is stage for e-mail security that says
" Email traffic can be scanned for spam, viruses and spyware. If you want to use the ASG as an SMTP relay for your internal email clients, enable the outbound SMTP Relay. If you want to scan incoming SMTP Traffic for malware and spam, enable the inbound SMTP relay.

[] Enable POP3 Poxy
[] Enable Inbound SMTP Relay

BUT There is NO Enable Outbound SMTP Relay on the screen which is what I need.

Please advice, thank you.[:S]


This thread was automatically locked due to age.
Parents
  • Scanning outbound mail has never been available in V7.

    Post-install:
    'Mail Security >> SMTP' 'Relaying' tab - 'Scan relayed (outgoing) messages' checkbox

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Hi,
    If you do a search in this forum for my user id, sometime in the last 3 months I posted a detailed description on how to setup scanning on out going smtp mail using the proxy for a home user.

    Ian M
  • Seems like DNAT has carried over from v6, I didn't try snat or other masq rules but if you put a dnat rule, atleast in my testing it is applied before the proxy is. I only tested it on smtp proxy because of the nature of the question but I am sure it will work on all if it is working on one.
  • Ian, Bob and Billybob.

    - Yes I did read about the suggestion on the DNAT but yet to implement as I was thinking there might be a easier way to do it such as maybe I configure something wrongly etc.

    I proceeded to do the DNAT but somehow SMTP 25 remains open on ShieldUp.

    465 and 587 is now closed with the same DNAT.

    - I created a Host Blackhole with a non exist IP.

    - I Created 

    For Port 25

     1) From ANY Service SMTP Destination WAN Address
         To Blackhole Service SMTP
         Auto Packet Filter Rule UNchecked.

    For Port 465

     2) From ANY Service SMTP SSL Destination WAN Address
         To Blackhole Service SMTP SSL
         Auto Packet Filter Rule UNchecked.

    For Port 587
    I created a TCP PORT 587 in the services as I do not see it.

     1) From ANY Service TCP Port 587 Destination WAN Address
         To Blackhole Service TCP Port 587
         Auto Packet Filter Rule UNchecked.


    The result from ShieldUp is Port 25 remains OPEN.

    Port 587 and Port 465 is now closed.

    But I do not understand why 25 remains open.

    Under SMTP Proxy, below is the settings, those not stated is not touched.

    Global = Simple Mode
    Domains and Routing Target = Empty.
    Route by MX Records. ( It used to be Static Host List but after I tried to play around, I can no longer set it back to Static Host List which is empty thus I choose MX Records)
    Host Based Relay = LAN Only.
    Host / Network Blacklist = ANY
    Scan Relayed (outgoing) messages = Checked
    Use Transparent Mode = Checked
    Use Smarthost = Checked with my ISP SMTP.
  • Hi All

    Recall I mentioned I did the DNAT as suggested by all the gurus, and the theory is DNAT is on top of Proxy etc. ( How I hope we can see all these "invisible" rules to troubleshoot better).

    Anyway originally, Port 25 is really always OPEN with DNAT.

    I came up with the idea, maybe the SMTP Proxy is "holding" to it thus DNAT cannot "take it"

    Thus I turned OFF SMTP and DNAT.

    ON the DNAT First, then the SMTP and now Port 25 is Closed ! [:D]

    Feels so great now...

    Question: Under Domains Routing: Should I put STATIC or Route by MX ?

    THANK YOU All for the help, really learned a lot such as can use DNAT to block, I always have the concept it is to open only.
  • Port 25 remains Open with DNAT.

    Added Block Rule on Top in Packet Filter still remains open.

    Just to confirm my DNAT is right, I disable DNAT and other ports open, so I am doing correctly just that somehow the other 2 ports will close but somehow 25 remains Open.

    Question just to make sure I do correctly.

    Routing should I set to

    1) MX Records
    2) STATIC -> Empty Domain List -> Blackhole Hostname which is Non exist IP.

    Which is better?

    The disturbing part is it started as 100% Empty, now I cannot make it 100% empty as it simply won't accept.

    One last port 25 to go.
  • It used to be Static Host List but after I tried to play around, I can no longer set it back to Static Host List which is empty thus I choose MX Records

    Something is not right and the webadmin is not behaving as it should. Just for FYI, I always use static host in there since it saves the firewall from making one extra query and saves on another point of failure. But that point is moot in your case since you are not allowing any from outside.

    You have stated that the port is stealth if you turn off smtp all together on grc.com? In my limited testing, DNAT made port 25 stealth on 7.401 (haven't taken the plunge to 7.402) on grc. Are you sure your router doesn't have smtp port. 

    Just out of curiosity, how were you blocking incoming smtp on v6 without DNAT if you had smtp proxy running?

    Added Block Rule on Top in Packet Filter still remains open.

    Builtin rules are always and have always been applied before manually added packet filter rules even in v6.
  • Hi Billybob.

    1) As I went thru the 7.402 setup from scratch several times. I am very sure this is the behavior.
    1.1) During the Basic Setup Wizard, I did Not check Allow Incoming SMTp.
    1.2) When log into Web Admin, the Routing is STATIC with Domain Empty and the Host List Empty.
    1.3) As part of my attempt to find the right configuration, I changed to MX Record and saved sucessfully, saw that it did not meet my requirements and wanted to change back.
    1.4) Now when I try to change back to Static, I can leave the list of domains empty But the Host List is a must to set something before it will save. So I set it to the "Blackhole" Hostlist I created to do the DNAT.

    2) I do not have a seperate Router, Astaro is my router. It is connected to Cable Modem directly.
    2.1) Yes all ports are simply closed when I disabled SMTP Proxy, absolutely sure of this.

    3) During the V6, It was simple, I remember I just state I use a SMART Host and that is it.
    [:)]
  • Have you tried to set a smarthost in the current version?
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Hi Alvin,
    I have just finished a basic security scan of my ASG with the same website you refer to in your message and not found any open ports. I will try again with the IPS disabled and see what happens.

    Ian M

    I ran the "No Risk Audit". It returned one intermediate threat ??, 3 minors and 6 others. The 3 minors were all about my non existent e-mail server which happens to be my hp7150 printer. The "others" were informational only "no risk".

    I did forget to add in my configuration post that I block all packet filter traffic below 1024 to ensure everything goes through the proxy. Some applications are very dumb and can't work with a proxy even when they have the ability to. I then put specific packet filter rules to allow them to talk to specific sites eg microsoft update, adobe update, Australian Tax Office (e-tax) etc.
  • Hi

    Balfson - Yes I added my ISP SMTP to the smarthost and looking at headers, yes it is working fine.

    RFCat_vk - Ensure your port scan detection under IPS is disabled.

    [:D]
  • Hi Alvin,
    yes, I had detect portscan disabled, I also disabled the DOS rules as well.

    Put them all back after I finished the tests.

    Ian M
Reply Children
  • RFCAT_VK

    So did your SMTP Ports shows Open?
  • Ok I have repeated the same test multiple times on grc.com. All tests with antiportscan turned off

    SMTP Proxy on, all ports are stealth, port 25 open
    SMTP proxy off, all ports are stealth
    SMTP proxy on, DNAT to no existing IP, ALL Ports Stealth Again.

    Again this is all with astaro 7.401.
  • Hi Billybob,
    thank you for those test results[:)].

    Ian M
  • Billybob

    Thanks for doing the testing

    1) It is strange that in your case, Only port 25 is open with SMTP Proxy, mine have 3 ports, 25, 465 and 587.

    2) Did you Enable Transparent Mode?
        I try and error with every setting ON and OFF and I realized if I enable Transparent Mode, 25 opens, if I disable it, it closes.
       But I do need Transparent Mode so that laptops need not reconfigure in and out of the network.

    3) For the Routing, is it better to use MX Records or STATIC Host -> Blackhole?


    Thanks !
  • Hi

    - I am quite sure it is that Transparent Proxy (Enabled) thus Port 25 is Open even with the DNAT.

    - But sometime when we try and error so much, I have to admit I get confused.

    - Can someone confirm Transparent Proxy Enabled, will have Port 25 open?

    - Any idea why I have other 2 ports when others only have 25?

    - Why is this the behavior since there is a section which allow us to define which network to allow relay? If we allow LAN, then it should simply Block WAN right based on the default is deny concept?

    - Please advice me for the routing, MX is better or Static -> Blackhole (non exist ip) is better, I am trying to make it as secure as possible but in this case both seems to work thus I cannot decide what is better.