Skip to content

Support sets in a table but outside a chain #21

@Ramblurr

Description

@Ramblurr

I'd like to define some Sets in the firewall table, but currently there doesn't seem to be a way to insert lines outside the chain blocks:

ruleset = ''
table inet firewall {
${concatMapStrings (x: "\n${x}\n") requiredChains}
}
'';
};

This would let me use rules like:

example = {
    from = [ "vlan1" ];
    to = [ "local" ];
    extraLines = [
    ''meta l4proto { tcp, udp } th dport @some_service_port ip daddr @some_service counter return comment "allow access some service"''
    ];
};

with sets like:

set some_service_port {
  type inet_service
  elements = { 2001, 2002 }
}

set some_service {
  type ipv4_addr
  elements = { 10.0.0.10 }
}

Any interest in supporting this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions