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

Running SMTP proxy on an alternate port

Hi,

I make use of the ASG SMTP proxy, but due to ISP restrictions I have SMTP coming in on port 2525 via the DynDNS MailHop Forwarding service.  What I'd like to do is to continue with this setup, but disallow any inbound port 25 traffic, since any SMTP coming in on port 25 is typically spam.  I'm having trouble figuring out how to do this, however.  Right now I have DNAT set up so "SMTP Alternate" (defined as port 2525) from any source and with a destination of the external ASG interface translates to regular SMTP also destined for the external interface.  This seems to work well in translating the inbound 2525 traffic to port 25 so that the SMTP proxy picks it up correctly.

What I cannot figure out is how to drop all inbound port 25 traffic.  I've set up a packet filter rule with priority #1 to drop all port 25 traffic from the "Internet" network, but this seems to have no effect (presumably due to the sequencing of the packet filter and DNAT - I think DNAT happens after the packet filter).  How can I drop port 25 traffic?  SNAT would I believe happen prior to the packet filter, but in that case I assume all my inbound traffic (including traffic that was originally on port 2525) would look like port 25 traffic, which of course I want to block.

I'm probably missing something obvious here - any help much appreciated.  What would be really nice is if the ASG SMTP proxy supported an option to run on a different port.

Thanks,
Martin.


This thread was automatically locked due to age.
  • In essence, the basic sequence is DNATs first, then proxies, then manually-created routes and packet filter rules, finally, SNATs.  That's why the DNAT of 2525 to 25 works with the Proxy.  And, your packet filter rule doesn't seem to work because the port-25 traffic is captured by the SMTP Proxy.

    In effect, using DNAT and SNAT, the Proxy therefore can be made to appear to run on a different port.

    So, to answer your question, you could create a DNAT to a non-existant IP, and that would effectively null-route those packets.  But, the Astaro is so efficient at stopping SPAM, why not just let the SMTP Proxy handle it?

    At first, I was confused that you also receive port-25 traffic, but I guess your ISP only blocks outbound SMTP traffic?

    Cheers - Bob
  • Thanks Bob,

    Yes, my ISP currently only blocks SMTP outbound, but for the last few years I was on Comcast which blocked both inbound and outbound port 25, making alternate port SMTP a necessity for me.  I've recently switched to Verizon FIOS which does not currently block inbound port 25, but I'm wary of relying on that since ISPs have a habit of suddenly introducing port blocks with no warning.  As a result I'm sticking with 2525 in and out for SMTP.

    I could certainly just rely on the Astaro to filter spam - I does an excellent job.  I guess I was just thinking it was being unduly bombarded with port 25 traffic which I knew was not valid, as a few spam email do slip through (but not many).  It's helpful to know I was barking up the wrong tree with the packet filter approach.

    Thanks,
    Martin.