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

"negated" FW rules/definition

Hello,
i have a very simple question that i haven't found a way in Astaro but that i can do with extreme ease in Mikrotik products:
How do i do a "negated" rulke or definition?, like "everything BUT...."

for example:
i have networkt A and B behind my ASG each with their own NIC in ASG.

I want a rule that allows A to access internet irrestricted, so i make a FW rule like:
src:A dest:any serv:any allow
I also want to make A access B but only on certain services(smb in this example), so i make the rule:
src:A dest: B serv:netbios allow

but the first rule takes precedence allowing ALL [:S], in mikrotik this is easy, as i only need to mark a checkbox that negates an entity, so i can make the first rule dst: !B and then the second allow rule.

If i had a "internet" entity(like sonicwall has) instead of any this could also work

As far as i can tell, this basic thing as "everything but" or "internet" is not present in ASG, care to enlighten me on how to do this?, since AFAIK rules execute in order, even if i put the A to B rule first, it will get overriden.


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

    Astaro does have an "Internet" defintion, it is usually created by the system it is an "Any" definition that is bound to the External interace.
  • Hi, 

    Astaro does have an "Internet" defintion, it is usually created by the system it is an "Any" definition that is bound to the External interace.


    hadn't seen it before, found it!.

    Well, that's one thing down from the list, but i still can't make a negated rule/definition
  • If you feel that this would be useful, you can always add it as a feature request at Astaro Gateway Feature Requests.

    Ordering is all important when making Firewall (formerly Packet Filter) rules in Astaro.  Packets are processed against rules in order (Rule#1, Rule#2, etc.) until one matches.  If a matching rule is found, then no further processing takes place.  E.G. If a packet matches on Rule#3, Rules#4+ will not be checked for that packet.
  • Yes, I wish Astaro had the possibility of defining a network with "this network" except "this list" - like "Internet" except "41.203.64.250".  Today, you need two packet filter rules like:
     - Internal (Network) -> Any -> 41.203.64.250 : Block
     - Internal (Network) -> Any -> Internet : Allow

    Cheers - Bob
  • Go for it Bob.  I'd submit this myself, but I'm stretched thin on points.
  • Yes, I wish Astaro had the possibility of defining a network with "this network" except "this list" - like "Internet" except "41.203.64.250".  Today, you need two packet filter rules like:
     - Internal (Network) -> Any -> 41.203.64.250 : Block
     - Internal (Network) -> Any -> Internet : Allow

    Cheers - Bob


    Bob, problem is, how do you make the opposite in ASG now?:
     - Internal (Network) -> Any -> 41.203.64.250 : Allow
     - Internal (Network) -> Any -> Internet : Block

    which wouldn't work as block takes precedence, how do you solve cases like this?

    there are already two feature opened but largely ignored:
    Paketfilter/NAT: Negate Objects
    Network Security: Logical "NOT" Support for Packet Filter, DNAT, etc...

    sadly this is a feature i need for several customer installations(specially with multi-LAN ones to control what traffic passes between them).

  • I want a rule that allows A to access internet irrestricted, so i make a FW rule like:
    src:A dest:any serv:any allow
    I also want to make A access B but only on certain services(smb in this example), so i make the rule:
    src:A dest: B serv:netbios allow


    1. src: A
    dest: B
    service: netbios
    allow

    2. src: A
    dest: B
    service: any
    deny

    3. src:A 
    dest:any 
    serv:any 
    allow

    Barry