summaryrefslogtreecommitdiff
path: root/data/templates/firewall
AgeCommit message (Collapse)Author
2026-10-30firewall: T9549: Fix default-firewall jump for VRF zone in local zoneNataliia Solomko
A local zone combined with a VRF-member zone that has default-firewall failed to commit: the jump for the VRF device rendered with no target ("jump NAME_"), which nftables rejects. The rule now jumps to the configured default-firewall.
2026-10-19Merge pull request #5573 from c-po/firewall-fixesChristian Breunig
firewall: T9474: multiple issues in rule processing (time based rules, fragment matching and failing commits)
2026-10-17nat66: T9475: rebuild NAT66 table when rule file and table drift apartChristian Breunig
The NAT66 ruleset only deleted the existing table when its rule file in /run was present. A table removed while the file stayed made the delete, and with it every following commit, fail. The table is now declared right before it is deleted, so each commit rebuilds it regardless of what is currently loaded.
2026-10-17nat: T9475: declare FQDN sets only onceChristian Breunig
The FQDN sets used by NAT rules were declared twice in the NAT table.
2026-10-17nat: T9475: recover from stale nftables rule filesChristian Breunig
Whether the NAT tables already exist was derived from the rendered rule files in /run. A failed commit could leave such a file behind without the table, every later NAT commit then tried to delete a missing table and failed with "Configuration file errors encountered!" until reboot. The NAT and static NAT tables are now declared before they are deleted, which succeeds whether or not they exist.
2026-10-17firewall: T9474: keep fragment matching working alongside packet marksChristian Breunig
Fragments were detected by overwriting the whole packet mark with a fixed value before reassembly. Any later mark - a raw "set mark" or a policy route "set table" - replaced it, so "fragment match-frag" no longer matched, and marks already present on fragments were lost. Fragments now only get bit 31 of the mark, which no configurable firewall or routing policy mark uses: - fragment matching tests the bit, mark matching ignores it - firewall and policy route mark writers keep it - policy route and local-route ip rules mask it while fragments are routed - it is cleared after the forward and input filters, so later consumers such as QoS or IPVS see the original mark WAN load-balancing still overwrites the mark and keeps the previous behaviour for fragments.
2026-10-17policy: T9474: rebuild PBR mangle tables when rule file and table drift apartChristian Breunig
The policy route ruleset only deleted the existing mangle tables when its rule file in /run was present. A table removed while the file stayed made the delete, and with it every following commit, fail. Both mangle tables are now declared right before they are deleted, so each commit rebuilds them regardless of what is currently loaded.
2026-10-17firewall: T9474: rebuild filter tables when rule file and table drift apartChristian Breunig
The generated ruleset only deleted the existing tables when the rule file in /run was present. If the file and the loaded tables drifted apart, e.g. a table was removed while the file stayed, the delete failed and every following commit failed with it. The tables are now declared right before they are deleted, so the delete succeeds whether or not the table exists and each commit rebuilds them from scratch.
2026-09-24T9152: Refactor source-validation to use vmapsl0crian1
- Reduced rule processing of source-validation rules through hashable objects
2026-09-24T9152: Refactor source-validation to use vmapsl0crian1
- Refactor source-validation to use vmaps - Update broken source-validation tests - Fix source-validation failing to remove rules when interface is removed (T9153)
2026-07-01firewall: T8761: re-introduce VRF interface names in generated firewall configDavid Vølker
This change re-implements the intended behaviour from T4180 aswell as from T4506, it ensures that both the vrf-member interface aswell as the vrf itself is added as an oifname -> meaning that traffic traversing and originating from withing VyOS is matches outbound. Changes done by c-po: * re-sort dependency list to keep diff low * vyos.configdict.is_vrf_changed() should return early and not carry over the to-be return value * keep common coding style (dict by . separation) in nftables-zone.j2 Co-authored-by: Christian Breunig <christian@breunig.cc>
2026-04-13T8478: Fix typo in the firewall template bridge chain nameViacheslav Hletenko
Internal typo/cosmitic bug, no functional changes
2026-03-24T8410: Fix typos and mistakes for operational and configuration commandsViacheslav Hletenko
Fix typos and mistakes in the commands and comments No functional changes
2026-03-14T8383: fix extra space in nftables ipv6 output chainAlex Kudentsov
2026-01-21geoip: T7926: Refactor geoip handlingsarthurdev
* Move core logic to separate vyos.geoip module * Use a sqlite database for storing and querying address ranges by country * Remove downloaded geoip ranges once loaded into sqlite db * No longer rebuild geoip sets on each commit unless necessary * Allows for extensibility using other geoip data vendors
2025-10-21firewall: T7739: Default ruleset for firewall zonesAdam Schultz
In large networks with many zones where simple allow/deny rules are not sufficient, zones become tedious to manage. Many use cases can be simplified by providing an ability to define a default ruleset for traffic from other zones. This change proposes adding the follwing syntax: set firewall zone <name> default_firewall name <name> set firewall zone <name> default_firewall ipv6_name <name> The proposed behavior is the following: local in: The default firewall ruleset for the local zone will be appended after all from configurations. local out: If a non-local zone does not have a from local ruleset but does have a default_firewall ruleset, the default_firewall ruleset will be appended using oifname forward: The default firewall ruleset for the zone will be appended after all from configurations To keep the behavior consistent with from ruleset configurations, a return is appended after the default_firewall ruleset. The proposed behavior differs slightly from the default_policy configuration for the local out chains. The default_policy applied in the out templates comes from the local zone, not the actual outbound zone. The proposed change does not amend this, but does make default_firewall logically consistent with the intent of the out rules.
2025-09-22Merge pull request #4698 from l0crian1/fw-disable-conntrackDaniil Baturin
firewall: T7475: Add an option to disable conntrack for individual firewall chaisn
2025-09-13firewall: T7475: Remove redundant if statement in jinja templatel0crian1
2025-09-05Firewall: T7475: Disable conntrack per firewall chainl0crian1
- Added command to disable conntrack per firewall chain - Added test_disable_conntrack_per_chain function to smoketest
2025-06-30firewall: T7452: update rule generation for Zone-based firewallDavid Vølker
2025-06-27vrf: T7544: Ensure correct quoting for VRF ifnames in nftablesAndrew Topp
* For VRF create/delete: * Simple dquoting, as before, was parsed away by the shell * Just escaping the double quotes could cause issues with the shell mangling VRF names (however unlikely) * Wrapping original quotes in shell-escaped single quotes is a quick & easy way to guard against both improper shell parsing and string names being taken as nft keywords. * Firewall configuration: * Firewall "interface name" rules support VRF ifnames and used them unquoted, fixed for nft_rule template tags (parse_rule) * Went through and quoted all iif/oifname usage by zones and interface groups. VRF ifnames weren't available for all cases, but there is no harm in completeness. * For this, also created a simple quoted_join template filter to replace any use of |join(',') * PBR calls nft but doesn't mind the "vni" name - table IDs used instead I may have missed some niche nft use-cases that would be exposed to this problem.
2025-06-17firewall: T6951: Add a configuration command for ethertypes that bridge ↵Nataliia Solomko
firewalls should always accept
2025-06-05T7523: firewall: Accepting invalid traffic for pppoe discovery and wolopswill
2025-06-01T7512: firewall: Modify accepting invalid traffic for VLAN aware bridgeIndrajit Raychaudhuri
Allow accepting invalid packets for ethernet types `8021q` and `8021ad` in addition to ARP and UDP types so that stateful bridge firewall works for VLAN-aware bridges in addition to regular bridges.
2025-05-07T7386: firewall: allow mix of IPv4 and IPv6 addresses/prefixes/ranges in ↵Mark Hayes
remote groups
2025-04-25Merge pull request #4457 from l0crian1/t7358-add-offload-to-global-stateViacheslav Hletenko
firewall: T7358: add offload option to global state policy
2025-04-18firewall: T7358: add offload option to global state policyl0crian1
- fixed CI smoketest failures (again)
2025-04-18firewall: T7358: add offload option to global state policyl0crian1
- Fixed CI smoketest failures
2025-04-16firewall: T7358: add offload option to global state policyl0crian1
Since the jump to the global state chain is inserted before all rules, it wasn't possible to use offload with the global state policies This commit adds a new chain for offloaded traffic in the forward chain and jumps to that chain. Please enter the commit message for your changes. Lines starting
2025-03-28geoip: T5636: Add geoip for policy route/route6sskaje
2025-03-21firewall: T5493: Implement remote-groupAlex W
2025-02-20firewall: T7148: Bridge state-policy uses drop in place of rejectsarthurdev
2025-01-06T6841: firewall: Fixed issues in ZBF when using VRFsaapostoliuk
Improve config parsing for ZBF when using VRFs and interfaces attached to VRFs
2025-01-06T6841: firewall: improve config parsing for ZBF when using VRFs and ↵Nicolas Fort
interfaces attached to VRFs
2024-12-13T6918: Accept invalid PPPoE Session in stateful bridge firewall.opswill
2024-09-30Merge pull request #4024 from nicolas-fort/T6687Daniil Baturin
T6687: add fqdn support to nat rules.
2024-09-16T6687: add fqdn support to nat rules.Nicolas Fort
2024-09-02T6679: add destination groupsNicolas Vollmar
2024-08-28T6647: firewall. Introduce patch for accepting ARP and DHCP replies on ↵Nicolas Fort
stateful bridge firewall. This patch is needed because ARP and DHCP are marked as invalid connections. Also, add ehternet-type matcher in bridge firewall.
2024-08-14T6636: firewall: fix firewall template in order to write logs for ↵Nicolas Fort
default-action in order to match same structure as in rules. This way op-mode command for showing firewall log prints logs for default-actions too
2024-08-02T4072: change same helpers in xml definitions; add notrack action for ↵Nicolas Fort
prerouting chain; re introduce <set vrf> in policy; change global options for passing traffic to IPvX firewall; update smoketest
2024-08-01T4072: firewall: extend firewall bridge smoketestNicolas Fort
2024-08-01T6570: firewall: add global-option to configure sysctl parameter for ↵Nicolas Fort
enabling/disabling sending traffic from bridge layer to ipvX layer
2024-08-01T4072: firewall: extend firewall bridge capabilities, in order to include ↵Nicolas Fort
new chains, priorities, and firewall groups
2024-06-25T3900: extend latest fix for firewall raw implementation to ipv6.Nicolas Fort
2024-06-20T3900: firewall: fix for initial implementation - remove jump to state ↵Nicolas Fort
policy on OUTUT_raw
2024-06-06Merge pull request #3578 from nicolas-fort/raw-hookDaniil Baturin
T3900: Add support for raw tables in firewall
2024-06-04T3900: T6394: extend functionalities in firewall; move netfilter sysctl ↵Nicolas Fort
timeout parameters defined in conntrack to firewall global-opton section.
2024-05-15T3900: add support for raw table in firewall.Nicolas Fort
2024-05-14T3420: Remove service upnpViacheslav Hletenko
Remove `service upnp` as it never worked as expected, nft rules do not integrated and custom patches do not seem like a suitable solution for now. Security: UPnP has been historically associated with security risks due to its automatic and potentially unauthenticated nature. UPnP devices might be vulnerable to unauthorized access or exploitation.