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

External Network vs. Any

imho should be a good idea to insert "External Network" in "Definitions-->Network" so is possible to do more efficient rules without use "any".
I say so because in my asl 5.023 with a PPPoE connection i must use "any" to allow clients' outbond traffic, but in this way thay cvan access to dmz [:(]enus.

TIA

Mario

PS: sorry for grammatical errors..


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

    how should you define "External" ?
    where does the system know from which networks you mean / or not mean ?!

    I think you have to live with it. First create the Deny rules and then declare the Any rules.

    Karsten
  • This question has been asked (a little differently) before.
    It was asked as "can we have the negation function added to the packet filter interface?"
    Essentially you want to be able to say...

    Source: Internal (Network)
    Service: Any
    Destination: Not DMZ (Network)
    Action: ALLOW

    You get into trouble if you have several DMZs or other internal networks that you need to segregate.
    For example...
    DMZ1 192.168.10.0/24
    DMZ2 192.168.20.0/24
    WLAN1 192.168.30.0/24
    LAN1 192.168.40.0/24
    LAN2 192.168.50.0/24

    So, you think you'll be clever and create a network group called secure_LANs and add the non-LAN1 networks definitions to it.

    This rule would be...

    Source: LAN1
    Service: Any
    Destination: NOT secure_LANs
    Action: Allow

    What gets created is...
    -s 192.168.40.0/24 -d !192.168.10.0/24 -j ACCEPT
    -s 192.168.40.0/24 -d !192.168.20.0/24 -j ACCEPT
    -s 192.168.40.0/24 -d !192.168.30.0/24 -j ACCEPT
    -s 192.168.40.0/24 -d !192.168.50.0/24 -j ACCEPT

    If you create the packet filter rules individually they get created the same way but is easier to see how things would get messed up.

    So, I'm in the LAN1 network and I try to get to DMZ2, the packet filter logic would suggest that since DMZ2 is in the Secure_LAN group then it wouldn't be allowed since it IS in the secure_LANs group, it wouldn't match and therefore would be denied.
    But look at the actual rules created.
    The first rule would match your traffic.
    source = 192.168.40.0/24 and the destination is NOT in 192.168.10.0/24
    Therefore it would match and jump to ACCEPT.

    You'd want to create 2 rules as...
    Source: LAN1, Service: Any, Destination: Secure_LANs, Action: Drop
    Source: LAN1, Service: Any, Destination: Any, Action: Allow

    What gets created is
    -s 192.168.40.0/24 -d 192.168.10.0/24 -j DENY
    -s 192.168.40.0/24 -d 192.168.20.0/24 -j DENY
    -s 192.168.40.0/24 -d 192.168.30.0/24 -j DENY
    -s 192.168.40.0/24 -d 192.168.50.0/24 -j DENY
    -s 192.168.40.0/24 -d any -j ACCEPT

    Now your LAN1 to DMZ2 traffic would match on the second rule and jump to DENY.

    Sorry for the long-winded answer but it's a little difficult to explain.
  • [ QUOTE ]
    Hi Mario,

    [/ QUOTE ]

    hi!

    [ QUOTE ]
    how should you define "External" ?

    [/ QUOTE ]

    okay, my router config.:
    LAN (Network): 172.16.0.0/16
    LAN (Address): 172.16.255.254
    DMZ (Netowork): 172.17.0.0/16
    DMZ (Address): 172.17.255.254
    External (Network): any other ip different by LAN and DMZ adresses.
    External (Address): assigned by isp

    so i define "external (network)" all public ips.

    [ QUOTE ]
    where does the system know from which networks you mean / or not mean ?!

    [/ QUOTE ]

    too difficult, can't translate sorry... [:(]

    [ QUOTE ]
    I think you have to live with it. First create the Deny rules and then declare the Any rules.

    [/ QUOTE ]

    alredy done, but is boring, more useful and quick to implement the "external (network)" selection.

    [ QUOTE ]
    Karsten 

    [/ QUOTE ]

    TIA

    Mario
  • another good thing, but we will go ot, is the possibility to select with "CTRL+Click" more services in packet filter rule without making a new service that include different other services...