Page MenuHomeVyOS Platform

Make it possible to disable connection tracking for specific firewall chains
Open, LowPublic

Description

As discussed in T7209, in some environments, enabling connection tracking by default is a bad idea. For example, in an ISP network, the firewall is usually configured to protect the router itself, so connection tracking is not really beneficial in the first place and can be prohibitively resource-intensive.

We should make it possible to disable connection per chain.

Trying to configure stateful rules in a chain where conntrack is disabled should probably cause commit errors.

Details

Version
-
Is it a breaking change?
Perfectly compatible
Issue type
Feature (new functionality)

Event Timeline

Will it not do what you want?

set firewall ipv4 prerouting raw default-action 'accept'
set firewall ipv4 prerouting raw rule 10 action 'notrack'
set firewall ipv4 prerouting raw rule 10 source address '192.0.2.0/24'

@dmbaturin @Viacheslav

I created a task for this as well https://vyos.dev/T7469

Will it not do what you want?

set firewall ipv4 prerouting raw default-action 'accept'
set firewall ipv4 prerouting raw rule 10 action 'notrack'
set firewall ipv4 prerouting raw rule 10 source address '192.0.2.0/24'

That will disable conntrack for both the input and forward chains. The nft config would probably be something like this:

Input:
ip vyos_filter VYOS_PREROUTING_raw fib daddr . iif type local notrack counter

Output:
ip vyos_filter VYOS_OUTPUT_raw notrack counter

Forward:
ip vyos_filter VYOS_PREROUTING_raw fib daddr . iif type unicast notrack counter

@dmbaturin @Viacheslav

I found a companion issue to this and created a task for it:
https://vyos.dev/T7781