All of lore.kernel.org
 help / color / mirror / Atom feed
* Incomprehensible behavior
@ 2023-08-03 14:43 toml
  2023-08-03 15:04 ` Florian Westphal
  0 siblings, 1 reply; 4+ messages in thread
From: toml @ 2023-08-03 14:43 UTC (permalink / raw)
  To: netfilter

(I'm so sorry... my previous post is in failed format... please ignore)

Hello @ all

I'm still struggling anymore with the new syntax at
ApplicationLayerGateway/FTP and testing with smallest steps. In doing
so I have now come across the following effect. I have 2 test-rules
here, both of which i expected to completely block any outgoing
traffic.

But as you can see from the second example in the counter, only here is
blocked. The first example has no effect at all, everything works as if
it was not blocked.

# nft list ruleset
table ip filter {
 chain output {
 type filter hook output priority 0; policy drop;
 meta pkttype { 0, 1, 2 } accept
 counter packets 0 bytes 0 reject with icmp 13
 }
}

# nft list ruleset
table ip filter {
 chain output {
 type filter hook output priority 0; policy drop;
 meta pkttype { 1, 2 } accept
 counter packets 1858 bytes 165434 reject with icmp 13
 }
}

Is this a desired behavior, when a unicast-accept virtually neutralizes
the complete filter? How do I deal with this problem?

Best Regards
Thomas


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Incomprehensible behavior
  2023-08-03 14:43 Incomprehensible behavior toml
@ 2023-08-03 15:04 ` Florian Westphal
  2023-08-03 15:59   ` toml
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Westphal @ 2023-08-03 15:04 UTC (permalink / raw)
  To: toml; +Cc: netfilter

toml <toml@thlu.de> wrote:
> (I'm so sorry... my previous post is in failed format... please ignore)
> 
> Hello @ all
> 
> I'm still struggling anymore with the new syntax at
> ApplicationLayerGateway/FTP and testing with smallest steps. In doing
> so I have now come across the following effect. I have 2 test-rules
> here, both of which i expected to completely block any outgoing
> traffic.
> 
> But as you can see from the second example in the counter, only here is
> blocked. The first example has no effect at all, everything works as if
> it was not blocked.
> 
> # nft list ruleset
> table ip filter {
>  chain output {
>  type filter hook output priority 0; policy drop;
>  meta pkttype { 0, 1, 2 } accep

What do you expect that line to do?

This accepts all packets, so all trailing rules
are bypassed and chain policy has no effect.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Incomprehensible behavior
  2023-08-03 15:04 ` Florian Westphal
@ 2023-08-03 15:59   ` toml
  0 siblings, 0 replies; 4+ messages in thread
From: toml @ 2023-08-03 15:59 UTC (permalink / raw)
  To: netfilter

Am Donnerstag, dem 03.08.2023 um 17:04 +0200 schrieb Florian Westphal:
> 
> What do you expect that line to do?
> 
> This accepts all packets, so all trailing rules
> are bypassed and chain policy has no effect.

Yes, it is so.

Obviously, I completely misunderstood. I had always assumed that
unicast, multicast and broadcast were something like a lan-technical
messaging system, such as is needed (as example) for router
advertisements or icmp. I assumed, that they must not be blocked for
error-free LAN operations, a bit like ICMP-V6. 

It is really complicated to find the right way. 

Thomas


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Incomprehensible behavior
@ 2023-08-03 14:37 toml
  0 siblings, 0 replies; 4+ messages in thread
From: toml @ 2023-08-03 14:37 UTC (permalink / raw)
  To: netfilter

Hello @ all

I'm still struggling anymore with the new syntax at ApplicationLayerGateway/FTP and testing with smallest steps. In doing so I have now come across the following effect. I have 2 test-rules here, both of which i expected to completely block any outgoing traffic.

But as you can see from the second example in the counter, only here is blocked. The first example has no effect at all, everything works as if it was not blocked.

# nft list ruleset
table ip filter {
    chain output {
        type filter hook output priority 0; policy drop;
        meta pkttype { 0, 1, 2 } accept
        counter packets 0 bytes 0 reject with icmp 13
    }
}

# nft list ruleset
table ip filter {
    chain output {
        type filter hook output priority 0; policy drop;
        meta pkttype { 1, 2 } accept
        counter packets 1858 bytes 165434 reject with icmp 13
    }
}

Is this a desired behavior, when a unicast-accept virtually neutralizes the complete filter? How do I deal with this problem?

Best Regards
Thomas

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-03 15:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-03 14:43 Incomprehensible behavior toml
2023-08-03 15:04 ` Florian Westphal
2023-08-03 15:59   ` toml
  -- strict thread matches above, loose matches on Subject: below --
2023-08-03 14:37 toml

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.