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

Packet filter rules order

Hi All

I have 10 pf rules and the last one is ip any any deny and log traffic(rule 10). However, when I look my pf log I can't see the rule 10 block. I only see the default block for the traffic.

Shouldn't I be able to view to pf rule 10 block since I am logging the traffic before the default block?

Thanks


This thread was automatically locked due to age.
  • update:

    the traffic is blocked by rule 10 only if the source is my internal network.. 

    the rule is : any > any> any block and log
  • I assume that the packets which are blocked by the default block rule (and you expect they should be blocked by your rule 10) are packets from source=somewhere in the internet  to destination=your ASG WAN Ip ?

    Then the behaviour would be ok as your any-any-any rule only affects traffic which is going _through_ your ASG but not _to_ the ASG. This is normal as there are different iptables chains for FORWARDING and for INCOMING traffic.

    If you want packets _to_ the ASGs interfaces blocked and logged by an extra rule, make a rule like:
    src=any  dest= (adress)   service=any action=drop&log
  • I assume that the packets which are blocked by the default block rule (and you expect they should be blocked by your rule 10) are packets from source=somewhere in the internet  to destination=your ASG WAN Ip ?

    Then the behaviour would be ok as your any-any-any rule only affects traffic which is going _through_ your ASG but not _to_ the ASG. This is normal as there are different iptables chains for FORWARDING and for INCOMING traffic.

    If you want packets _to_ the ASGs interfaces blocked and logged by an extra rule, make a rule like:
    src=any  dest= (adress)   service=any action=drop&log


    Thanks!Now it makes sense [:)]