Skip to content

Conversation

@nblair2
Copy link
Contributor

@nblair2 nblair2 commented Nov 12, 2025

fix(vrouter): ACL rules are now enforced on VyOS

Description

We add a jump rule for each ingress/egress ruleset in the vrouter VyOS template so that the forward chain jumps traffic to the appropriate name chains that are already created. Note: using the forward chain is a limitation (does not protect the firewall, requires forwarding traffic across interfaces).

Before this fix, firewall (ACL) rules in vrouter vyos template were created, but added to a custom 'name' chain. Custom name chains are not used by default. "Custom firewall chains can be created, with commands set firewall ipv4 name .... In order to use such custom chain, a rule with action jump, and the appropriate target should be defined in a base chain."
https://docs.vyos.io/en/latest/configuration/firewall/ipv4.html

I think a re-write of the VyOS template that takes advantage of VyOS zone-based routing would be more efficient and intuitive to users, but would require modification of the vrouter app spec. This does not work (tried in https://github.com/nblair2/sceptre-phenix/tree/fix/vrouter-acl2). Zone-based rules are deny by default, so creating zones is all-or-nothing. User would have to explicitly add an allow established/related to all zones.

Related Issue

resolves #257

Type of Change

Please select the type of change your pull request introduces:

  • Bugfix

Checklist

  • This PR conforms to the process detailed in the Contributing Guide.
  • I have included no proprietary/sensitive information in my code.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have tested my code.

Additional Notes

N/A

We add a jump rule for each ingress/egress ruleset in the vrouter VyOS
template so that the forward chain jumps traffic to the appropriate
name chains that are already created. Note: using the forward chain
is a limitation (does not protect the fireall, requires forwarding
traffic across interfaces).

Before this fix, firewall (ACL) rules in vrouter vyos template were
created, but added to a custom 'name' chain. Custom name chains are
not used by default. "Custom firewall chains can be created, with
commands set firewall ipv4 name <name> .... In order to use such
custom chain, a rule with action jump, and the appropriate target
should be defined in a base chain."
https://docs.vyos.io/en/latest/configuration/firewall/ipv4.html

I think a re-write of the VyOS template that takes advantage of VyOS
zone-based routing would be more efficient and intuitive to users,
but would require modification of the vrouter app spec.

ref: sandialabs#257
@nblair2 nblair2 changed the title fix(vrouter): ACL rules are now enforced on VyOS fix(vrouter): ACL rules enforced on VyOS Nov 13, 2025
@nblair2 nblair2 marked this pull request as ready for review November 13, 2025 20:08
@cmulk cmulk merged commit bca7571 into sandialabs:main Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Vrouter app firewall rules for VyOS 1.5

2 participants