summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2025-09-18 12:14:24 +0100
committerGitHub <noreply@github.com>2025-09-18 12:14:24 +0100
commit119e9fedbdd10abdc6e65f8e25dff04b58c37781 (patch)
tree859f4105ec074bc3aed6e1f39a45ec79d02a162f /data
parent02c32914f60b4cbda4470967afe120325188bc28 (diff)
parentae732fb0eb1dd352ba0b97b07aaf3db9c514ea19 (diff)
downloadvyos-1x-119e9fedbdd10abdc6e65f8e25dff04b58c37781.tar.gz
vyos-1x-119e9fedbdd10abdc6e65f8e25dff04b58c37781.zip
Merge pull request #4708 from sarthurdev/T114
wlb: T114: Add firewall group support for WAN load balancer
Diffstat (limited to 'data')
-rw-r--r--data/config-mode-dependencies/vyos-1x.json2
-rw-r--r--data/templates/load-balancing/nftables-wlb.j24
2 files changed, 5 insertions, 1 deletions
diff --git a/data/config-mode-dependencies/vyos-1x.json b/data/config-mode-dependencies/vyos-1x.json
index ccfc022f4..d186c52bb 100644
--- a/data/config-mode-dependencies/vyos-1x.json
+++ b/data/config-mode-dependencies/vyos-1x.json
@@ -5,7 +5,7 @@
},
"firewall": {
"conntrack": ["system_conntrack"],
- "group_resync": ["system_conntrack", "nat", "policy_route"]
+ "group_resync": ["system_conntrack", "nat", "policy_route", "load-balancing_wan"]
},
"interfaces_bonding": {
"ethernet": ["interfaces_ethernet"]
diff --git a/data/templates/load-balancing/nftables-wlb.j2 b/data/templates/load-balancing/nftables-wlb.j2
index 8afd0c162..6d71676c4 100644
--- a/data/templates/load-balancing/nftables-wlb.j2
+++ b/data/templates/load-balancing/nftables-wlb.j2
@@ -1,5 +1,7 @@
#!/usr/sbin/nft -f
+{% import 'firewall/nftables-defines.j2' as group_tmpl %}
+
{% if first_install is not vyos_defined %}
delete table ip vyos_wanloadbalance
{% endif %}
@@ -61,4 +63,6 @@ table ip vyos_wanloadbalance {
meta mark set {{ state.mark }} ct mark set {{ state.mark }} counter accept
}
{% endfor %}
+
+{{ group_tmpl.groups(firewall_group, False, True) }}
}