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

I cannot block an IP address

I'm baffled.  I have a rogue process on a web server that I have no control over sending tens of thousands of email messages to my server.  I created what I thought was a very simple packet filter rule that says the source is this IP host, destination smtp (I tried with any), destination is any, and I've tried drop and block.  The connections are still allowed.  The rule is at the top and is turned on.

It would seem to be a simple thing to do, but I'm not having any joy.  What am I missing here?

Thanks.

Danita


This thread was automatically locked due to age.
  • Hi Danita,

    Remember the basic rule: DNATs come before Proxies and VPNs and those come before manual Routes and Firewall Rules.

    Putting a DNAT at the top of the list should let you null route those packets.

    Beyond that, if this isn't an email server, then it sounds like you would want to take the Proxy out of transparent mode and just use the 'Allowed Hosts/Networks' on the 'Relaying' tab.

    Cheers - Bob
  • Well, the Astaro gateway IS an email proxy server.  So are you telling me that the mail proxy cannot be affected by a Firewall rule?  I'm taking this from your DNAT before Proxy before Firewall Rules statement.  Since the Mail Proxy comes before the Firewall rule there is no way to block an inbound mail server connection by IP address?

    I guess the simple question is this:  If I am filtering mail at the Astaro, how can I block a mail server by IP address from connecting?  I see how I can blacklist addresses, but how can I ban a bad server from talking to me?

    And the crisis is over as we got the sending server to cease and desist (after about 100,000 messages!!!), but I'd like to know for the future.  I've tried blocking before with the same (non) results so it would be good to understand I guess!

    Thanks Bob!

    Danita
  • In SMTP under Relying tab,
    Put that Ip like a host in Blocked hosts/networks
  • and like Bob said create a NAT rule and return those packet to the same ip [:)]
  • Thanks Olsi - I KNEW THAT.  It just never hits me because the idea of "relay" is not what I think of when I'm blocking an IP address.  I think of packet filters!

    Oh well.

    Next time I will be prepared!

    Danita
  • with SMTP proxy this only the way. he can contact your server by telnet but your server will refuse any email from that IP. Tested with the same problem 3 days ago
  • Danita, you can't use a Firewall rule to keep packets from getting through to a Proxy, but you can use a DNAT to send them off to Bit Heaven. [:)]

    I, too, had forgotten about the solution that Olsi reminded us about.

    Cheers - Bob
    PS I read your original post too fast.  This wasn't an internal server causing you to spam others.  I grayed out the part of my post that was irrelevant.
  • Bob 
    I tested to block my work IP sending email to my home 
    There is nothing you can do with firewall rules and NAT with the SMTP ports 
    since SMTP proxy is active
    My question is this: If I skip that IP in Skip transparent mode hosts/nets, for that ip firewall and NAT rules will ta effect for the SMTP ports too ?
  • Olsi, try with something like '{spammer's IP} -> SMTP -> External (Address) : DNAT to {non-existent IP}'.

    Cheers - Bob
  • Yes Bob 
    Just now tried to block the IP contacting port 25 and and my idea worked [:)]
    I'm explaining now

    If the SMTP Proxy is active, Firewall and NAT rules cannot do nothing for port 25. In any scenario they are useless. 
    To prevent an IP not only to send emails to you but also contacting your external address by telnet in port 25, take it out from smtp proxy by putting that IP in Skip transparent mode hosts/nets under Advanced tab in SMTP
    Doing that, Firewall an NAT rules can do anything with that IP

    this is the best way Danita, one day after you will never see that traffic