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

Securing SMTP proxy

Hi all,

Running the SMTP proxy on ASL 5.026 - works well.

I have tried securing it and only allowing our ISP to connect to port 25 but to no avail.

I have the SMTP proxy running and then a firewall rule allowing the IP of our ISP to connect to port 25. And then a rule underneath to block all SMTP traffic from anywhere going to port 25.

But it just dont work. I can telnet to port 25 from anywhere. Is it the case that the SMTP proxy setting overrides any aditional firewall rule?

Any help welcome.

Thanks
Bryan


This thread was automatically locked due to age.
Parents Reply Children
  • [ QUOTE ]
    If you define only one host on the allowed network, only this host can send mails - i think it's secure enoght!

    Medic 

    [/ QUOTE ]

    But this is for outgoing Mail only.
    It really seems that you can not limit incoming connections, since the rules of the built-in-services take precedence.
  • Sorry, I should've said. This is about securing incoming mail from outside the firewall ie the internet.
  • create a file in /etc/init.d called ipfilter.local and chmod 400.
    Add these lines to it.

    iptables -D AUTO_INPUT -p tcp --sport 1:65535 --dport 25 -j ACCEPT
    iptables -D AUTO_INPUT -p tcp -s 1.2.3.4/32 --sport 1: 65535 --dport 25 -j ACCEPT
    iptables -A AUTO_INPUT -p tcp -s 1.2.3.4/32 --sport 1: 65535 --dport 25 -j ACCEPT

    This will delete the ASL generated AUTO_INPUT rule to accept any port 25 traffic and then only accept traffic from the host 1.2.3.4.

    Good luck.
  • Thanks for that Jim.

    Do I need to create the file and boot the firewall, or can I do it on the fly some how?

    Thanks
    Bryan
  • Create (and delete...) a trivial rule on the web interface;
    that will then 'wake' Astaro up and it will see that the file is there and run it...

    P.S. It is important that the file have read-only permissions...
  • Thanks to Jim and Secapp.

    Although I have a Linux background - mainly slackware, I have trouble hacking around with ASL - what distro is it based on??

    Anyway, my last question on this subject - is there any documentation out there with regards to what you have just shown me. While I understand the nice point and click interface is OK for most cases, sometimes it is nesecary to tinker under the hood!

    Any pointers to websites etc most welcome.

    Bryan
  • ASL5 is supposedly sort of based on some version of RedHat.
    (they're using RPMs for package management now)

    However, ASL is very stripped down compared to any normal distribution. Also, most of the daemons are chrooted so you won't find them or their config files in the normal places.
    (look in /var/chroot* instead)

    For info, keep reading this forum. 
    There have been a few external sites with some info, the most current one I know of is
    http://www.sputcorp.com/asl/faq/faq.asp

    Also, if the pluspack is ever released for 5.x, that is helpful as you then have a compiler and other tools making it easier to add your own stuff.

    I've been getting by with statically compiling things like LCD4Linux or IPTraf, but it gets tricky for complicated stuff like trying to add perl modules, etc.

    Barry
  • I don't think Suse should be called "some version of redhat" :-)
    If you look at the rpms and for example /etc It seems like Suse 8 Maybe
    SLES8.
  • They were using a lot of SUSE early on, then shifted predominantly to RedHat. Next week -who knows?

    As for doing such mods, that is a touchy matter for Astaro that has been discussed to death before -concerns for them are legal if you screw up and actions they did to accommodate are taken as sanctions on your behavior. Silly to think that they would be liable for your actions, but sometimes juries and judges can be silly when it comes to sorting out tech disputes.

    "They're not liable if somebody leaves ports open through the construction of rules; why should they be concerned about software mods?"

    There are tons of workplace precedents for administering firewall rules; it's easy to get an army of expert witnesses to vouch that Astaro is blameless for such actions. Supporting and/or endorsing firewall mods -that's a new thing, and litigious jerks would certainly be looking to run into court with that one.

    So mum's the word on their part
    (except that they don't sanction it...)