{%
let flowtable_devices = fw4.resolve_offload_devices();
let available_helpers = filter(fw4.helpers(), h => h.available);
+ let defined_ipsets = fw4.ipsets();
-%}
table inet fw4
{% endif %}
}
+
{% endif %}
{% if (length(available_helpers)): %}
#
{% endfor %}
{% endif %}
+{% if (length(defined_ipsets)): %}
#
# Set definitions
#
-{% for (let set in fw4.ipsets()): %}
+{% for (let set in defined_ipsets): %}
set {{ set.name }} {
type {{ fw4.concat(set.types) }}
-{% if (set.maxelem > 0): %}
+{% if (set.maxelem > 0): %}
size {{ set.maxelem }}
-{% endif %}
-{% if (set.timeout >= 0): %}
+{% endif %}
+{% if (set.timeout >= 0): %}
timeout {{ set.timeout }}s
-{% endif %}
-{% if (set.interval): %}
+{% endif %}
+{% if (set.interval): %}
flags interval
auto-merge
-{% endif %}
-{% fw4.print_setentries(set) %}
+{% endif %}
+{% fw4.print_setentries(set) %}
}
-{% endfor %}
+{% endfor %}
+{% endif %}
#
# Defines
#
{% for (let zone in fw4.zones()): %}
-{% if (length(zone.match_devices)): %}
define {{ zone.name }}_devices = {{ fw4.set(zone.match_devices, true) }}
-{% endif %}
-{% if (length(zone.match_subnets)): %}
define {{ zone.name }}_subnets = {{ fw4.set(zone.match_subnets, true) }}
-{% endif %}
+
{% endfor %}
#
flags offload;
}
+
#
# CT helper definitions
#
}
- #
- # Set definitions
- #
-
-
#
# Defines
#
define lan_devices = { "br-lan" }
define lan_subnets = { 10.0.0.0/24, 192.168.26.0/24, 2001:db8:1000::/60, fd63:e2f:f706::/60 }
+
define wan_devices = { "pppoe-wan" }
define wan_subnets = { 10.11.12.0/24, 2001:db8:54:321::/64 }
+
#
# User includes
#
flush table inet fw4
table inet fw4 {
- #
- # Set definitions
- #
-
-
#
# Defines
#
define lan_devices = { "br-lan" }
define lan_subnets = { 10.0.0.0/24, 192.168.26.0/24, 2001:db8:1000::/60, fd63:e2f:f706::/60 }
+
define wan_devices = { "pppoe-wan" }
define wan_subnets = { 10.11.12.0/24 }
+
#
# User includes
#
flush table inet fw4
table inet fw4 {
- #
- # Set definitions
- #
-
-
#
# Defines
#
define test1_devices = { "zone1" }
+ define test1_subnets = { }
+
define test2_devices = { "zone2" }
+ define test2_subnets = { }
+
define test3_devices = { "zone3" }
+ define test3_subnets = { }
+
#
# User includes
flush table inet fw4
table inet fw4 {
- #
- # Set definitions
- #
-
-
#
# Defines
#
define test1_devices = { "zone1" }
+ define test1_subnets = { }
+
define test2_devices = { "zone2" }
+ define test2_subnets = { }
+
define test3_devices = { "zone3" }
+ define test3_subnets = { }
+
#
# User includes
flush table inet fw4
table inet fw4 {
- #
- # Set definitions
- #
-
-
#
# Defines
#
define test1_devices = { "zone1" }
+ define test1_subnets = { }
+
define test2_devices = { "zone2" }
+ define test2_subnets = { }
+
#
# User includes
flush table inet fw4
table inet fw4 {
- #
- # Set definitions
- #
-
-
#
# Defines
#
define test1_devices = { "+" }
+ define test1_subnets = { }
+
define test2_devices = { "/never/" }
+ define test2_subnets = { }
+
define test3_devices = { "test*" }
+ define test3_subnets = { }
+
define test4_devices = { "foo*", "bar*", "test1", "test2" }
+ define test4_subnets = { }
+
define test5_devices = { "foo*", "bar*", "test1", "test2" }
+ define test5_subnets = { }
+
#
# User includes
flush table inet fw4
table inet fw4 {
- #
- # Set definitions
- #
-
-
#
# Defines
#
+ define test1_devices = { }
+ define test1_subnets = { }
+
+ define test2_devices = { }
define test2_subnets = { ::3, ::4 }
+
#
# User includes
#
flush table inet fw4
table inet fw4 {
- #
- # Set definitions
- #
-
-
#
# Defines
#
+ define test1_devices = { }
define test1_subnets = { 10.0.0.0/8 }
+
+ define test2_devices = { }
define test2_subnets = { 2001:db8:1234::/64 }
+
+ define test3_devices = { }
define test3_subnets = { 2001:db8:1234::/64 }
+
+ define test4_devices = { }
define test4_subnets = { 2001:db8:1234::/64 }
+
define test5_devices = { "eth0" }
+ define test5_subnets = { }
+
#
# User includes
}
- #
- # Set definitions
- #
-
-
#
# Defines
#
define test1_devices = { "zone1" }
+ define test1_subnets = { }
+
define test2_devices = { "zone2" }
+ define test2_subnets = { }
+
define test3_devices = { "zone3" }
+ define test3_subnets = { }
+
define test4_devices = { "zone4" }
+ define test4_subnets = { }
+
#
# User includes
flush table inet fw4
table inet fw4 {
- #
- # Set definitions
- #
-
-
#
# Defines
#
flush table inet fw4
table inet fw4 {
- #
- # Set definitions
- #
-
-
#
# Defines
#
flush table inet fw4
table inet fw4 {
- #
- # Set definitions
- #
-
-
#
# Defines
#
+ define lan_devices = { }
+ define lan_subnets = { }
+
#
# User includes
flush table inet fw4
table inet fw4 {
- #
- # Set definitions
- #
-
-
#
# Defines
#
flush table inet fw4
table inet fw4 {
- #
- # Set definitions
- #
-
-
#
# Defines
#
define lan_devices = { "eth0", "eth1" }
+ define lan_subnets = { }
+
define wan_devices = { "eth2", "eth3" }
+ define wan_subnets = { }
+
#
# User includes
flush table inet fw4
table inet fw4 {
- #
- # Set definitions
- #
-
-
#
# Defines
#
define wan_devices = { "pppoe-wan" }
define wan_subnets = { 2001:db8:54:321::/64 }
+
define lan_devices = { "br-lan" }
define lan_subnets = { 10.0.0.0/24, 192.168.26.0/24, 2001:db8:1000::/60, fd63:e2f:f706::/60 }
+
define guest_devices = { "br-guest" }
define guest_subnets = { 10.1.0.0/24, 192.168.27.0/24, 2001:db8:1000::/60, fd63:e2f:f706::/60 }
+
#
# User includes
#
flush table inet fw4
table inet fw4 {
- #
- # Set definitions
- #
-
-
#
# Defines
#
define wan_devices = { "pppoe-wan" }
define wan_subnets = { 10.11.12.0/24, 2001:db8:54:321::/64 }
+
define lan_devices = { "br-lan" }
define lan_subnets = { 10.0.0.0/24, 192.168.26.0/24, 2001:db8:1000::/60, fd63:e2f:f706::/60 }
+
define noaddr_devices = { "wwan0" }
+ define noaddr_subnets = { }
+
#
# User includes
# Defines
#
+ define ipv4only_devices = { }
define ipv4only_subnets = { 192.168.1.0/24 }
+
#
# User includes
#
flush table inet fw4
table inet fw4 {
- #
- # Set definitions
- #
-
-
#
# Defines
#
flush table inet fw4
table inet fw4 {
- #
- # Set definitions
- #
-
-
#
# Defines
#
define zone1_devices = { "eth0" }
+ define zone1_subnets = { }
+
define zone2_devices = { "lo" }
+ define zone2_subnets = { }
+
+ define zone3_devices = { }
define zone3_subnets = { 127.0.0.0/8, ::1 }
+
#
# User includes
#
flush table inet fw4
table inet fw4 {
- #
- # Set definitions
- #
-
-
#
# Defines
#
define wanA_devices = { "eth0" }
+ define wanA_subnets = { }
+
define wanB_devices = { "eth1" }
+ define wanB_subnets = { }
+
define lan_devices = { "eth2" }
+ define lan_subnets = { }
+
#
# User includes