firewall4: refresh fullcone patch
This commit is contained in:
parent
6e384969c3
commit
a9c064d2de
@ -31,12 +31,12 @@ Renew: ZiMing Mo <msylgj@immortalwrt.org>
|
||||
+++ b/root/usr/share/firewall4/templates/ruleset.uc
|
||||
@@ -1,3 +1,4 @@
|
||||
+{# /usr/share/firewall4/templates/ruleset.uc #}
|
||||
{% let flowtable_devices = fw4.resolve_offload_devices(); -%}
|
||||
|
||||
table inet fw4
|
||||
@@ -238,6 +239,10 @@ table inet fw4 {
|
||||
{% for (let redirect in fw4.redirects(`dstnat_${zone.name}`)): %}
|
||||
{%+ include("redirect.uc", { fw4, redirect }) %}
|
||||
{%
|
||||
let flowtable_devices = fw4.resolve_offload_devices();
|
||||
let available_helpers = filter(fw4.helpers(), h => h.available);
|
||||
@@ -247,6 +248,10 @@ table inet fw4 {
|
||||
{% for (let rule in fw4.rules(`helper_${zone.name}`)): %}
|
||||
{%+ include("rule.uc", { fw4, rule }) %}
|
||||
{% endfor %}
|
||||
+{% if (fw4.default_option("fullcone")): %}
|
||||
+ {%+ include("zone-fullcone.uc", { fw4, zone, direction: "dstnat" }) %}
|
||||
@ -45,7 +45,7 @@ Renew: ZiMing Mo <msylgj@immortalwrt.org>
|
||||
}
|
||||
|
||||
{% endif %}
|
||||
@@ -246,7 +251,7 @@ table inet fw4 {
|
||||
@@ -320,7 +325,7 @@ table inet fw4 {
|
||||
{% for (let redirect in fw4.redirects(`srcnat_${zone.name}`)): %}
|
||||
{%+ include("redirect.uc", { fw4, redirect }) %}
|
||||
{% endfor %}
|
||||
@ -54,7 +54,7 @@ Renew: ZiMing Mo <msylgj@immortalwrt.org>
|
||||
{% for (let saddrs in zone.masq4_src_subnets): %}
|
||||
{% for (let daddrs in zone.masq4_dest_subnets): %}
|
||||
{%+ include("zone-masq.uc", { fw4, zone, family: 4, saddrs, daddrs }) %}
|
||||
@@ -260,6 +265,10 @@ table inet fw4 {
|
||||
@@ -334,6 +339,10 @@ table inet fw4 {
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
@ -62,9 +62,9 @@ Renew: ZiMing Mo <msylgj@immortalwrt.org>
|
||||
+ {%+ include("zone-fullcone.uc", { fw4, zone, direction: "srcnat" }) %}
|
||||
+{% endif %}
|
||||
+
|
||||
{% fw4.includes('chain-append', `srcnat_${zone.name}`) %}
|
||||
}
|
||||
|
||||
{% endif %}
|
||||
--- /dev/null
|
||||
+++ b/root/usr/share/firewall4/templates/zone-fullcone.uc
|
||||
@@ -0,0 +1,4 @@
|
||||
@ -106,7 +106,7 @@ Renew: ZiMing Mo <msylgj@immortalwrt.org>
|
||||
|
||||
return {
|
||||
read_kernel_version: function() {
|
||||
@@ -1377,6 +1398,7 @@ return {
|
||||
@@ -1385,6 +1406,7 @@ return {
|
||||
"dnat",
|
||||
"snat",
|
||||
"masquerade",
|
||||
@ -114,7 +114,7 @@ Renew: ZiMing Mo <msylgj@immortalwrt.org>
|
||||
"accept",
|
||||
"reject",
|
||||
"drop"
|
||||
@@ -1800,6 +1822,7 @@ return {
|
||||
@@ -1852,6 +1874,7 @@ return {
|
||||
}
|
||||
|
||||
let defs = this.parse_options(data, {
|
||||
@ -122,7 +122,7 @@ Renew: ZiMing Mo <msylgj@immortalwrt.org>
|
||||
input: [ "policy", "drop" ],
|
||||
output: [ "policy", "drop" ],
|
||||
forward: [ "policy", "drop" ],
|
||||
@@ -1832,6 +1855,14 @@ return {
|
||||
@@ -1884,6 +1907,14 @@ return {
|
||||
|
||||
delete defs.syn_flood;
|
||||
|
||||
@ -137,7 +137,7 @@ Renew: ZiMing Mo <msylgj@immortalwrt.org>
|
||||
this.state.defaults = defs;
|
||||
},
|
||||
|
||||
@@ -2056,10 +2087,15 @@ return {
|
||||
@@ -2110,10 +2141,15 @@ return {
|
||||
zone.related_subnets = related_subnets;
|
||||
zone.related_physdevs = related_physdevs;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user