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

Firewall rules - order of precedence

Hi;

My first firewall rule states
    "GroupAllBlockedHosts" on any service, destination Any -> Drop.
The group, "GroupAllBlockedHosts" contains multiple Network Definitions all along the following lines.
     name->Block 203.45.0.0/16, type->network, interface->any, 
     ip4add->203.45.0.0, netmask->/16 (255.255.0.0)
I would expect that this being the first firewall rule, that any traffic 
coming from one of the listed ip's within the range would be blocked. 
But I keep finding that when I look at my Pop3 Proxy log, hosts within 
this range ie: 203.45.23.188 would be blocked and not trying 20,000 
times a day to access my mail server behind the firewall, like such...

  excerpt from pop3 proxy log
  2011:10:21-10:35:00 tspoon pop3proxy[30703]: Accepted client 
          connection from 203.45.23.188 for 14.201.129.252
  2011:10:21-10:35:01 tspoon pop3proxy[30595]: Connection to 
          remote server failed: PASS for user barbara failed on remote 
          server: -ERR Authentication failed.

The Group "GroupAllBlockedHosts" also gets used in several other locations
Used in these configurations: 
   Mail Security -> SMTP -> Relaying
   Network Security -> NAT -> DNAT/SNAT
   Network Security -> Firewall -> Rules
Used by these objects: 
01)  Network Security -> Firewall -> Rules -> Any from Z-All Blocked Hosts to Any
   Network Security -> Firewall -> Rules
02)  Network Security -> NAT -> DNAT/SNAT -> Any from Z-All Blocked Hosts to Any
   Network Security -> NAT -> DNAT/SNAT

The Dnat rule is the first rule, and states the following
  DNAT [BlackHole]
  Traffic selector: Z-All Blocked Hosts -> Any -> Any
  Destination translation: Blackhole (192.168.11.200 Non-existant network)
  Automatic Firewall rule:
  Initial packets are logged:

A couple of questions.
1. Is there a limit to the amount of definitions that can be included within
   a group, currently I have 63 individual definitions in the 
   "GroupAllBlockedHosts" group

2. With all the block/drop, or redirect to a black hole, why am I seeing 
   entries for ip addresses in my pop3 proxy log.

3. What else do I need to provide so people can better help me work out
    what I've got wrong.  :-) 

Trevor..


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

    When this is resolved, you're going to laugh at yourself for making this all so hard. [;)]

    In fact, if the only use of the POP3 proxy is to allow access to an internal mail server, you should turn it off.  There's no point in re-scanning emails that already have been checked by the (vastly superior) SMTP Proxy.

    What is your mail server?  What mail client is used internally?

    Cheers - Bob
    PS The one thing that comes before proxies is DNATs.  The fact that yours isn't capturing the unwanted traffic is an indication that the traffic selector isn't quite right.  In fact, for DNATs, in general, you need to use the address object created by WebAdmin (like "External (Address)") as the destination in order for the DNAT to capture traffic sent to the Astaro.
  • Hi again;

    Ok, lets see if I have this correct.

    1. big wide www
    2. server Astaro sitting as firewall. (3 nics)
    3. second server, mail, web, single server sitting in DMZ
    4. third network internal Lan

    Machines on internal Lan get mail from DMZ via astaro,
    astaro already has rules in Network Security -> Firewall -> Rules
    .....Internal -> any -> DMZ

    Machines on WWW get mail from DMZ via astaro, and due to precedence of Network -> NAT -> DNAT rule
    .....Any -> POP3 -> external => DMZ server pop3
    there is no need to have the pop3 proxy enable under Mail -> Security -> pop3.

    Is the statement by dilandau "The intended purpose for the pop3 proxy is to filter traffic for computers on the local network that are contacting an external mail server" correct. If so, then yes BAlfson I see that I am making it hard for myself, not quite giggling, but at least smiling.  (Sort of one of those OOOhhh moments, I get it..)  Would this explain why when I turned off the DNAT rule and only went with the POP3 proxy people on the WWW couldn't get mail.?

    Mail server is Centos 5, mail clients on internal pc's Thunderbird, external people using all sorts of email clients from thunderbird, to android phones default program.

    Now also stating that DNAT's comes before Proxies still doesn't explain why my first DNAT rule. 
    .....DNAT [BlackHole]
    .....Traffic selector: Z-All Blocked Hosts -> Any -> External WAN Address
    .....Destination translation: Blackhole (192.168.11.200)
    .....Automatic Firewall rule:
    .....Initial packets are logged:
    isn't sending these unwanted hosts to the 192.168.11.200 (non existent server on DMZ)


    I now have a couple of further questions..
    From reading BAlfson PS. comment. it has got me thinking that I should also be more specific with some of my definitions. I normally refer to individual entities, ie: an external www hosts by interface set to > instead of interface set to External (WAN). Will this make much impact on the running of the Astaro..


    Also following on, in regards to smtp proxy. If I have that enabled, then I don't need a DNAT rule.

    One final question..
    Where in the order does the Network Security -> Firewall -> rules fit in.
    I would have thought that that would have been first, and being first then I thought that the following would have basically drop everything from these "BlockHosts"
    "GroupAllBlockedHosts" on any service, destination Any -> Drop.
    .........this rule has now been modified to 
    "GroupAllBlockedHosts" on any service, destination External Wan Address -> Drop.

    Am I still missing the point with some things..

    Thanks.
    Trevor..
Reply
  • Hi again;

    Ok, lets see if I have this correct.

    1. big wide www
    2. server Astaro sitting as firewall. (3 nics)
    3. second server, mail, web, single server sitting in DMZ
    4. third network internal Lan

    Machines on internal Lan get mail from DMZ via astaro,
    astaro already has rules in Network Security -> Firewall -> Rules
    .....Internal -> any -> DMZ

    Machines on WWW get mail from DMZ via astaro, and due to precedence of Network -> NAT -> DNAT rule
    .....Any -> POP3 -> external => DMZ server pop3
    there is no need to have the pop3 proxy enable under Mail -> Security -> pop3.

    Is the statement by dilandau "The intended purpose for the pop3 proxy is to filter traffic for computers on the local network that are contacting an external mail server" correct. If so, then yes BAlfson I see that I am making it hard for myself, not quite giggling, but at least smiling.  (Sort of one of those OOOhhh moments, I get it..)  Would this explain why when I turned off the DNAT rule and only went with the POP3 proxy people on the WWW couldn't get mail.?

    Mail server is Centos 5, mail clients on internal pc's Thunderbird, external people using all sorts of email clients from thunderbird, to android phones default program.

    Now also stating that DNAT's comes before Proxies still doesn't explain why my first DNAT rule. 
    .....DNAT [BlackHole]
    .....Traffic selector: Z-All Blocked Hosts -> Any -> External WAN Address
    .....Destination translation: Blackhole (192.168.11.200)
    .....Automatic Firewall rule:
    .....Initial packets are logged:
    isn't sending these unwanted hosts to the 192.168.11.200 (non existent server on DMZ)


    I now have a couple of further questions..
    From reading BAlfson PS. comment. it has got me thinking that I should also be more specific with some of my definitions. I normally refer to individual entities, ie: an external www hosts by interface set to > instead of interface set to External (WAN). Will this make much impact on the running of the Astaro..


    Also following on, in regards to smtp proxy. If I have that enabled, then I don't need a DNAT rule.

    One final question..
    Where in the order does the Network Security -> Firewall -> rules fit in.
    I would have thought that that would have been first, and being first then I thought that the following would have basically drop everything from these "BlockHosts"
    "GroupAllBlockedHosts" on any service, destination Any -> Drop.
    .........this rule has now been modified to 
    "GroupAllBlockedHosts" on any service, destination External Wan Address -> Drop.

    Am I still missing the point with some things..

    Thanks.
    Trevor..
Children
No Data