|
|
bb602c |
From e5bc451f0f0240c7fe460196e6d07163366318c2 Mon Sep 17 00:00:00 2001
|
|
|
bb602c |
From: Eric Garver <eric@garver.life>
|
|
|
bb602c |
Date: Sun, 19 Jan 2020 16:49:14 -0500
|
|
|
bb602c |
Subject: [PATCH 142/146] test: verify AllowZoneDrifting=yes
|
|
|
bb602c |
|
|
|
bb602c |
Verify the zone dispatch layout.
|
|
|
bb602c |
|
|
|
bb602c |
(cherry picked from commit bca4e6af91fc4c6a55f7c2bce9e4fe7bcee526a1)
|
|
|
bb602c |
(cherry picked from commit cd257ae4604b1666136ffb1e12924a5c1f74095f)
|
|
|
bb602c |
---
|
|
|
bb602c |
src/tests/regression/gh258.at | 532 +++++++++++++++++++++++++---
|
|
|
bb602c |
src/tests/regression/rhbz1734765.at | 181 +++++++++-
|
|
|
bb602c |
2 files changed, 668 insertions(+), 45 deletions(-)
|
|
|
bb602c |
|
|
|
bb602c |
diff --git a/src/tests/regression/gh258.at b/src/tests/regression/gh258.at
|
|
|
bb602c |
index 5671c37ba432..5c5c8db0126f 100644
|
|
|
bb602c |
--- a/src/tests/regression/gh258.at
|
|
|
bb602c |
+++ b/src/tests/regression/gh258.at
|
|
|
bb602c |
@@ -1,12 +1,15 @@
|
|
|
bb602c |
FWD_START_TEST([zone dispatch layout])
|
|
|
bb602c |
-AT_KEYWORDS(zone gh258 gh441 rhbz1713823)
|
|
|
bb602c |
+AT_KEYWORDS(zone gh258 gh441 rhbz1713823 rhbz1772208 rhbz1796055)
|
|
|
bb602c |
|
|
|
bb602c |
-FWD_CHECK([--zone=work --add-source="1.2.3.0/24"], 0, ignore)
|
|
|
bb602c |
+FWD_CHECK([--permanent --zone=trusted --add-source="1.2.3.0/24"], 0, ignore)
|
|
|
bb602c |
IF_HOST_SUPPORTS_IPV6_RULES([
|
|
|
bb602c |
-FWD_CHECK([--zone=public --add-source="dead:beef::/54"], 0, ignore)
|
|
|
bb602c |
+FWD_CHECK([--permanent --zone=public --add-source="dead:beef::/54"], 0, ignore)
|
|
|
bb602c |
])
|
|
|
bb602c |
-FWD_CHECK([--zone=work --add-interface=dummy0], 0, ignore)
|
|
|
bb602c |
-FWD_CHECK([--zone=public --add-interface=dummy1], 0, ignore)
|
|
|
bb602c |
+FWD_CHECK([--permanent --zone=trusted --add-interface=dummy0], 0, ignore)
|
|
|
bb602c |
+FWD_CHECK([--permanent --zone=public --add-interface=dummy1], 0, ignore)
|
|
|
bb602c |
+
|
|
|
bb602c |
+AT_CHECK([sed -i 's/^AllowZoneDrifting.*/AllowZoneDrifting=no/' ./firewalld.conf])
|
|
|
bb602c |
+FWD_RELOAD
|
|
|
bb602c |
|
|
|
bb602c |
dnl verify layout of zone dispatch
|
|
|
bb602c |
m4_if(nftables, FIREWALL_BACKEND, [
|
|
|
bb602c |
@@ -25,9 +28,9 @@ NFT_LIST_RULES([inet], [filter_INPUT_ZONES], 0, [dnl
|
|
|
bb602c |
table inet firewalld {
|
|
|
bb602c |
chain filter_INPUT_ZONES {
|
|
|
bb602c |
ip6 saddr dead:beef::/54 goto filter_IN_public
|
|
|
bb602c |
- ip saddr 1.2.3.0/24 goto filter_IN_work
|
|
|
bb602c |
+ ip saddr 1.2.3.0/24 goto filter_IN_trusted
|
|
|
bb602c |
+ iifname "dummy0" goto filter_IN_trusted
|
|
|
bb602c |
iifname "dummy1" goto filter_IN_public
|
|
|
bb602c |
- iifname "dummy0" goto filter_IN_work
|
|
|
bb602c |
goto filter_IN_public
|
|
|
bb602c |
}
|
|
|
bb602c |
}
|
|
|
bb602c |
@@ -48,9 +51,9 @@ NFT_LIST_RULES([inet], [filter_FORWARD_IN_ZONES], 0, [dnl
|
|
|
bb602c |
table inet firewalld {
|
|
|
bb602c |
chain filter_FORWARD_IN_ZONES {
|
|
|
bb602c |
ip6 saddr dead:beef::/54 goto filter_FWDI_public
|
|
|
bb602c |
- ip saddr 1.2.3.0/24 goto filter_FWDI_work
|
|
|
bb602c |
+ ip saddr 1.2.3.0/24 goto filter_FWDI_trusted
|
|
|
bb602c |
+ iifname "dummy0" goto filter_FWDI_trusted
|
|
|
bb602c |
iifname "dummy1" goto filter_FWDI_public
|
|
|
bb602c |
- iifname "dummy0" goto filter_FWDI_work
|
|
|
bb602c |
goto filter_FWDI_public
|
|
|
bb602c |
}
|
|
|
bb602c |
}
|
|
|
bb602c |
@@ -59,9 +62,9 @@ NFT_LIST_RULES([inet], [filter_FORWARD_OUT_ZONES], 0, [dnl
|
|
|
bb602c |
table inet firewalld {
|
|
|
bb602c |
chain filter_FORWARD_OUT_ZONES {
|
|
|
bb602c |
ip6 daddr dead:beef::/54 goto filter_FWDO_public
|
|
|
bb602c |
- ip daddr 1.2.3.0/24 goto filter_FWDO_work
|
|
|
bb602c |
+ ip daddr 1.2.3.0/24 goto filter_FWDO_trusted
|
|
|
bb602c |
+ oifname "dummy0" goto filter_FWDO_trusted
|
|
|
bb602c |
oifname "dummy1" goto filter_FWDO_public
|
|
|
bb602c |
- oifname "dummy0" goto filter_FWDO_work
|
|
|
bb602c |
goto filter_FWDO_public
|
|
|
bb602c |
}
|
|
|
bb602c |
}
|
|
|
bb602c |
@@ -89,9 +92,9 @@ NFT_LIST_RULES([inet], [raw_PREROUTING_ZONES], 0, [dnl
|
|
|
bb602c |
table inet firewalld {
|
|
|
bb602c |
chain raw_PREROUTING_ZONES {
|
|
|
bb602c |
ip6 saddr dead:beef::/54 goto raw_PRE_public
|
|
|
bb602c |
- ip saddr 1.2.3.0/24 goto raw_PRE_work
|
|
|
bb602c |
+ ip saddr 1.2.3.0/24 goto raw_PRE_trusted
|
|
|
bb602c |
+ iifname "dummy0" goto raw_PRE_trusted
|
|
|
bb602c |
iifname "dummy1" goto raw_PRE_public
|
|
|
bb602c |
- iifname "dummy0" goto raw_PRE_work
|
|
|
bb602c |
goto raw_PRE_public
|
|
|
bb602c |
}
|
|
|
bb602c |
}
|
|
|
bb602c |
@@ -107,9 +110,9 @@ NFT_LIST_RULES([inet], [mangle_PREROUTING_ZONES], 0, [dnl
|
|
|
bb602c |
table inet firewalld {
|
|
|
bb602c |
chain mangle_PREROUTING_ZONES {
|
|
|
bb602c |
ip6 saddr dead:beef::/54 goto mangle_PRE_public
|
|
|
bb602c |
- ip saddr 1.2.3.0/24 goto mangle_PRE_work
|
|
|
bb602c |
+ ip saddr 1.2.3.0/24 goto mangle_PRE_trusted
|
|
|
bb602c |
+ iifname "dummy0" goto mangle_PRE_trusted
|
|
|
bb602c |
iifname "dummy1" goto mangle_PRE_public
|
|
|
bb602c |
- iifname "dummy0" goto mangle_PRE_work
|
|
|
bb602c |
goto mangle_PRE_public
|
|
|
bb602c |
}
|
|
|
bb602c |
}
|
|
|
bb602c |
@@ -124,9 +127,9 @@ NFT_LIST_RULES([ip], [nat_PREROUTING], 0, [dnl
|
|
|
bb602c |
NFT_LIST_RULES([ip], [nat_PREROUTING_ZONES], 0, [dnl
|
|
|
bb602c |
table ip firewalld {
|
|
|
bb602c |
chain nat_PREROUTING_ZONES {
|
|
|
bb602c |
- ip saddr 1.2.3.0/24 goto nat_PRE_work
|
|
|
bb602c |
+ ip saddr 1.2.3.0/24 goto nat_PRE_trusted
|
|
|
bb602c |
+ iifname "dummy0" goto nat_PRE_trusted
|
|
|
bb602c |
iifname "dummy1" goto nat_PRE_public
|
|
|
bb602c |
- iifname "dummy0" goto nat_PRE_work
|
|
|
bb602c |
goto nat_PRE_public
|
|
|
bb602c |
}
|
|
|
bb602c |
}
|
|
|
bb602c |
@@ -141,9 +144,9 @@ NFT_LIST_RULES([ip], [nat_POSTROUTING], 0, [dnl
|
|
|
bb602c |
NFT_LIST_RULES([ip], [nat_POSTROUTING_ZONES], 0, [dnl
|
|
|
bb602c |
table ip firewalld {
|
|
|
bb602c |
chain nat_POSTROUTING_ZONES {
|
|
|
bb602c |
- ip daddr 1.2.3.0/24 goto nat_POST_work
|
|
|
bb602c |
+ ip daddr 1.2.3.0/24 goto nat_POST_trusted
|
|
|
bb602c |
+ oifname "dummy0" goto nat_POST_trusted
|
|
|
bb602c |
oifname "dummy1" goto nat_POST_public
|
|
|
bb602c |
- oifname "dummy0" goto nat_POST_work
|
|
|
bb602c |
goto nat_POST_public
|
|
|
bb602c |
}
|
|
|
bb602c |
}
|
|
|
bb602c |
@@ -159,8 +162,8 @@ NFT_LIST_RULES([ip6], [nat_PREROUTING_ZONES], 0, [dnl
|
|
|
bb602c |
table ip6 firewalld {
|
|
|
bb602c |
chain nat_PREROUTING_ZONES {
|
|
|
bb602c |
ip6 saddr dead:beef::/54 goto nat_PRE_public
|
|
|
bb602c |
+ iifname "dummy0" goto nat_PRE_trusted
|
|
|
bb602c |
iifname "dummy1" goto nat_PRE_public
|
|
|
bb602c |
- iifname "dummy0" goto nat_PRE_work
|
|
|
bb602c |
goto nat_PRE_public
|
|
|
bb602c |
}
|
|
|
bb602c |
}
|
|
|
bb602c |
@@ -176,8 +179,8 @@ NFT_LIST_RULES([ip6], [nat_POSTROUTING_ZONES], 0, [dnl
|
|
|
bb602c |
table ip6 firewalld {
|
|
|
bb602c |
chain nat_POSTROUTING_ZONES {
|
|
|
bb602c |
ip6 daddr dead:beef::/54 goto nat_POST_public
|
|
|
bb602c |
+ oifname "dummy0" goto nat_POST_trusted
|
|
|
bb602c |
oifname "dummy1" goto nat_POST_public
|
|
|
bb602c |
- oifname "dummy0" goto nat_POST_work
|
|
|
bb602c |
goto nat_POST_public
|
|
|
bb602c |
}
|
|
|
bb602c |
}
|
|
|
bb602c |
@@ -193,9 +196,9 @@ IPTABLES_LIST_RULES([filter], [INPUT], 0, [dnl
|
|
|
bb602c |
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
|
|
|
bb602c |
])
|
|
|
bb602c |
IPTABLES_LIST_RULES([filter], [INPUT_ZONES], 0,
|
|
|
bb602c |
- [[IN_work all -- 1.2.3.0/24 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ [[IN_trusted all -- 1.2.3.0/24 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ IN_trusted all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
IN_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
- IN_work all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
IN_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
]])
|
|
|
bb602c |
IPTABLES_LIST_RULES([filter], [FORWARD], 0, [dnl
|
|
|
bb602c |
@@ -208,15 +211,15 @@ IPTABLES_LIST_RULES([filter], [FORWARD], 0, [dnl
|
|
|
bb602c |
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
|
|
|
bb602c |
])
|
|
|
bb602c |
IPTABLES_LIST_RULES([filter], [FORWARD_IN_ZONES], 0,
|
|
|
bb602c |
- [[FWDI_work all -- 1.2.3.0/24 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ [[FWDI_trusted all -- 1.2.3.0/24 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ FWDI_trusted all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
FWDI_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
- FWDI_work all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
FWDI_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
]])
|
|
|
bb602c |
IPTABLES_LIST_RULES([filter], [FORWARD_OUT_ZONES], 0,
|
|
|
bb602c |
- [[FWDO_work all -- 0.0.0.0/0 1.2.3.0/24 [goto]
|
|
|
bb602c |
+ [[FWDO_trusted all -- 0.0.0.0/0 1.2.3.0/24 [goto]
|
|
|
bb602c |
+ FWDO_trusted all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
FWDO_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
- FWDO_work all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
FWDO_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
]])
|
|
|
bb602c |
IPTABLES_LIST_RULES([raw], [PREROUTING], 0, [dnl
|
|
|
bb602c |
@@ -224,9 +227,9 @@ IPTABLES_LIST_RULES([raw], [PREROUTING], 0, [dnl
|
|
|
bb602c |
PREROUTING_ZONES all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
])
|
|
|
bb602c |
IPTABLES_LIST_RULES([raw], [PREROUTING_ZONES], 0,
|
|
|
bb602c |
- [[PRE_work all -- 1.2.3.0/24 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ [[PRE_trusted all -- 1.2.3.0/24 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ PRE_trusted all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
PRE_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
- PRE_work all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
PRE_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
]])
|
|
|
bb602c |
IPTABLES_LIST_RULES([mangle], [PREROUTING], 0, [dnl
|
|
|
bb602c |
@@ -234,9 +237,9 @@ IPTABLES_LIST_RULES([mangle], [PREROUTING], 0, [dnl
|
|
|
bb602c |
PREROUTING_ZONES all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
])
|
|
|
bb602c |
IPTABLES_LIST_RULES([mangle], [PREROUTING_ZONES], 0,
|
|
|
bb602c |
- [[PRE_work all -- 1.2.3.0/24 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ [[PRE_trusted all -- 1.2.3.0/24 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ PRE_trusted all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
PRE_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
- PRE_work all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
PRE_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
]])
|
|
|
bb602c |
IPTABLES_LIST_RULES([nat], [PREROUTING], 0, [dnl
|
|
|
bb602c |
@@ -244,9 +247,9 @@ IPTABLES_LIST_RULES([nat], [PREROUTING], 0, [dnl
|
|
|
bb602c |
PREROUTING_ZONES all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
])
|
|
|
bb602c |
IPTABLES_LIST_RULES([nat], [PREROUTING_ZONES], 0,
|
|
|
bb602c |
- [[PRE_work all -- 1.2.3.0/24 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ [[PRE_trusted all -- 1.2.3.0/24 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ PRE_trusted all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
PRE_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
- PRE_work all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
PRE_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
]])
|
|
|
bb602c |
IPTABLES_LIST_RULES([nat], [POSTROUTING], 0, [dnl
|
|
|
bb602c |
@@ -254,9 +257,9 @@ IPTABLES_LIST_RULES([nat], [POSTROUTING], 0, [dnl
|
|
|
bb602c |
POSTROUTING_ZONES all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
])
|
|
|
bb602c |
IPTABLES_LIST_RULES([nat], [POSTROUTING_ZONES], 0,
|
|
|
bb602c |
- [[POST_work all -- 0.0.0.0/0 1.2.3.0/24 [goto]
|
|
|
bb602c |
+ [[POST_trusted all -- 0.0.0.0/0 1.2.3.0/24 [goto]
|
|
|
bb602c |
+ POST_trusted all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
POST_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
- POST_work all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
POST_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
]])
|
|
|
bb602c |
|
|
|
bb602c |
@@ -270,8 +273,8 @@ IP6TABLES_LIST_RULES([filter], [INPUT], 0, [dnl
|
|
|
bb602c |
])
|
|
|
bb602c |
IP6TABLES_LIST_RULES([filter], [INPUT_ZONES], 0,
|
|
|
bb602c |
[[IN_public all dead:beef::/54 ::/0 [goto]
|
|
|
bb602c |
+ IN_trusted all ::/0 ::/0 [goto]
|
|
|
bb602c |
IN_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
- IN_work all ::/0 ::/0 [goto]
|
|
|
bb602c |
IN_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
]])
|
|
|
bb602c |
IP6TABLES_LIST_RULES([filter], [FORWARD], 0, [dnl
|
|
|
bb602c |
@@ -285,14 +288,14 @@ IP6TABLES_LIST_RULES([filter], [FORWARD], 0, [dnl
|
|
|
bb602c |
])
|
|
|
bb602c |
IP6TABLES_LIST_RULES([filter], [FORWARD_IN_ZONES], 0,
|
|
|
bb602c |
[[FWDI_public all dead:beef::/54 ::/0 [goto]
|
|
|
bb602c |
+ FWDI_trusted all ::/0 ::/0 [goto]
|
|
|
bb602c |
FWDI_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
- FWDI_work all ::/0 ::/0 [goto]
|
|
|
bb602c |
FWDI_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
]])
|
|
|
bb602c |
IP6TABLES_LIST_RULES([filter], [FORWARD_OUT_ZONES], 0,
|
|
|
bb602c |
[[FWDO_public all ::/0 dead:beef::/54 [goto]
|
|
|
bb602c |
+ FWDO_trusted all ::/0 ::/0 [goto]
|
|
|
bb602c |
FWDO_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
- FWDO_work all ::/0 ::/0 [goto]
|
|
|
bb602c |
FWDO_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
]])
|
|
|
bb602c |
IP6TABLES_LIST_RULES([raw], [PREROUTING], 0, [dnl
|
|
|
bb602c |
@@ -304,8 +307,8 @@ IP6TABLES_LIST_RULES([raw], [PREROUTING], 0, [dnl
|
|
|
bb602c |
])
|
|
|
bb602c |
IP6TABLES_LIST_RULES([raw], [PREROUTING_ZONES], 0,
|
|
|
bb602c |
[[PRE_public all dead:beef::/54 ::/0 [goto]
|
|
|
bb602c |
+ PRE_trusted all ::/0 ::/0 [goto]
|
|
|
bb602c |
PRE_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
- PRE_work all ::/0 ::/0 [goto]
|
|
|
bb602c |
PRE_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
]])
|
|
|
bb602c |
IP6TABLES_LIST_RULES([mangle], [PREROUTING], 0, [dnl
|
|
|
bb602c |
@@ -314,8 +317,8 @@ IP6TABLES_LIST_RULES([mangle], [PREROUTING], 0, [dnl
|
|
|
bb602c |
])
|
|
|
bb602c |
IP6TABLES_LIST_RULES([mangle], [PREROUTING_ZONES], 0,
|
|
|
bb602c |
[[PRE_public all dead:beef::/54 ::/0 [goto]
|
|
|
bb602c |
+ PRE_trusted all ::/0 ::/0 [goto]
|
|
|
bb602c |
PRE_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
- PRE_work all ::/0 ::/0 [goto]
|
|
|
bb602c |
PRE_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
]])
|
|
|
bb602c |
IP6TABLES_LIST_RULES([nat], [PREROUTING], 0, [dnl
|
|
|
bb602c |
@@ -324,8 +327,8 @@ IP6TABLES_LIST_RULES([nat], [PREROUTING], 0, [dnl
|
|
|
bb602c |
])
|
|
|
bb602c |
IP6TABLES_LIST_RULES([nat], [PREROUTING_ZONES], 0,
|
|
|
bb602c |
[[PRE_public all dead:beef::/54 ::/0 [goto]
|
|
|
bb602c |
+ PRE_trusted all ::/0 ::/0 [goto]
|
|
|
bb602c |
PRE_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
- PRE_work all ::/0 ::/0 [goto]
|
|
|
bb602c |
PRE_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
]])
|
|
|
bb602c |
IP6TABLES_LIST_RULES([nat], [POSTROUTING], 0, [dnl
|
|
|
bb602c |
@@ -334,10 +337,453 @@ IP6TABLES_LIST_RULES([nat], [POSTROUTING], 0, [dnl
|
|
|
bb602c |
])
|
|
|
bb602c |
IP6TABLES_LIST_RULES([nat], [POSTROUTING_ZONES], 0,
|
|
|
bb602c |
[[POST_public all ::/0 dead:beef::/54 [goto]
|
|
|
bb602c |
+ POST_trusted all ::/0 ::/0 [goto]
|
|
|
bb602c |
POST_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
- POST_work all ::/0 ::/0 [goto]
|
|
|
bb602c |
POST_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
]])
|
|
|
bb602c |
])
|
|
|
bb602c |
|
|
|
bb602c |
-FWD_END_TEST
|
|
|
bb602c |
+dnl ##########################################################################
|
|
|
bb602c |
+dnl ##########################################################################
|
|
|
bb602c |
+dnl We also support zone drifting in which source based zones fall through to
|
|
|
bb602c |
+dnl interface based zones (including default zone).
|
|
|
bb602c |
+dnl ##########################################################################
|
|
|
bb602c |
+dnl ##########################################################################
|
|
|
bb602c |
+AT_CHECK([sed -i 's/^AllowZoneDrifting.*/AllowZoneDrifting=yes/' ./firewalld.conf])
|
|
|
bb602c |
+FWD_RELOAD
|
|
|
bb602c |
+
|
|
|
bb602c |
+NFT_LIST_RULES([inet], [filter_INPUT], 0, [dnl
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain filter_INPUT {
|
|
|
bb602c |
+ ct state established,related accept
|
|
|
bb602c |
+ iifname "lo" accept
|
|
|
bb602c |
+ jump filter_INPUT_ZONES_SOURCE
|
|
|
bb602c |
+ jump filter_INPUT_ZONES
|
|
|
bb602c |
+ ct state invalid drop
|
|
|
bb602c |
+ reject with icmpx type admin-prohibited
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([inet], [filter_INPUT_ZONES_SOURCE], 0, [dnl
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain filter_INPUT_ZONES_SOURCE {
|
|
|
bb602c |
+ ip6 saddr dead:beef::/54 goto filter_IN_public
|
|
|
bb602c |
+ ip saddr 1.2.3.0/24 goto filter_IN_trusted
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([inet], [filter_INPUT_ZONES], 0, [dnl
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain filter_INPUT_ZONES {
|
|
|
bb602c |
+ iifname "dummy0" goto filter_IN_trusted
|
|
|
bb602c |
+ iifname "dummy1" goto filter_IN_public
|
|
|
bb602c |
+ goto filter_IN_public
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([inet], [filter_FORWARD], 0, [dnl
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain filter_FORWARD {
|
|
|
bb602c |
+ ct state established,related accept
|
|
|
bb602c |
+ iifname "lo" accept
|
|
|
bb602c |
+ jump filter_FORWARD_IN_ZONES_SOURCE
|
|
|
bb602c |
+ jump filter_FORWARD_IN_ZONES
|
|
|
bb602c |
+ jump filter_FORWARD_OUT_ZONES_SOURCE
|
|
|
bb602c |
+ jump filter_FORWARD_OUT_ZONES
|
|
|
bb602c |
+ ct state invalid drop
|
|
|
bb602c |
+ reject with icmpx type admin-prohibited
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([inet], [filter_FORWARD_IN_ZONES_SOURCE], 0, [dnl
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain filter_FORWARD_IN_ZONES_SOURCE {
|
|
|
bb602c |
+ ip6 saddr dead:beef::/54 goto filter_FWDI_public
|
|
|
bb602c |
+ ip saddr 1.2.3.0/24 goto filter_FWDI_trusted
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([inet], [filter_FORWARD_IN_ZONES], 0, [dnl
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain filter_FORWARD_IN_ZONES {
|
|
|
bb602c |
+ iifname "dummy0" goto filter_FWDI_trusted
|
|
|
bb602c |
+ iifname "dummy1" goto filter_FWDI_public
|
|
|
bb602c |
+ goto filter_FWDI_public
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([inet], [filter_FORWARD_OUT_ZONES_SOURCE], 0, [dnl
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain filter_FORWARD_OUT_ZONES_SOURCE {
|
|
|
bb602c |
+ ip6 daddr dead:beef::/54 goto filter_FWDO_public
|
|
|
bb602c |
+ ip daddr 1.2.3.0/24 goto filter_FWDO_trusted
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([inet], [filter_FORWARD_OUT_ZONES], 0, [dnl
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain filter_FORWARD_OUT_ZONES {
|
|
|
bb602c |
+ oifname "dummy0" goto filter_FWDO_trusted
|
|
|
bb602c |
+ oifname "dummy1" goto filter_FWDO_public
|
|
|
bb602c |
+ goto filter_FWDO_public
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+IF_HOST_SUPPORTS_NFT_FIB([
|
|
|
bb602c |
+ NFT_LIST_RULES([inet], [raw_PREROUTING], 0, [dnl
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain raw_PREROUTING {
|
|
|
bb602c |
+ icmpv6 type { nd-router-advert, nd-neighbor-solicit } accept
|
|
|
bb602c |
+ meta nfproto ipv6 fib saddr . iif oif missing drop
|
|
|
bb602c |
+ jump raw_PREROUTING_ZONES_SOURCE
|
|
|
bb602c |
+ jump raw_PREROUTING_ZONES
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ ])
|
|
|
bb602c |
+], [
|
|
|
bb602c |
+ NFT_LIST_RULES([inet], [raw_PREROUTING], 0, [dnl
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain raw_PREROUTING {
|
|
|
bb602c |
+ jump raw_PREROUTING_ZONES_SOURCE
|
|
|
bb602c |
+ jump raw_PREROUTING_ZONES
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ ])
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([inet], [raw_PREROUTING_ZONES_SOURCE], 0, [dnl
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain raw_PREROUTING_ZONES_SOURCE {
|
|
|
bb602c |
+ ip6 saddr dead:beef::/54 goto raw_PRE_public
|
|
|
bb602c |
+ ip saddr 1.2.3.0/24 goto raw_PRE_trusted
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([inet], [raw_PREROUTING_ZONES], 0, [dnl
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain raw_PREROUTING_ZONES {
|
|
|
bb602c |
+ iifname "dummy0" goto raw_PRE_trusted
|
|
|
bb602c |
+ iifname "dummy1" goto raw_PRE_public
|
|
|
bb602c |
+ goto raw_PRE_public
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([inet], [mangle_PREROUTING], 0, [dnl
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain mangle_PREROUTING {
|
|
|
bb602c |
+ jump mangle_PREROUTING_ZONES_SOURCE
|
|
|
bb602c |
+ jump mangle_PREROUTING_ZONES
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([inet], [mangle_PREROUTING_ZONES_SOURCE], 0, [dnl
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain mangle_PREROUTING_ZONES_SOURCE {
|
|
|
bb602c |
+ ip6 saddr dead:beef::/54 goto mangle_PRE_public
|
|
|
bb602c |
+ ip saddr 1.2.3.0/24 goto mangle_PRE_trusted
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([inet], [mangle_PREROUTING_ZONES], 0, [dnl
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain mangle_PREROUTING_ZONES {
|
|
|
bb602c |
+ iifname "dummy0" goto mangle_PRE_trusted
|
|
|
bb602c |
+ iifname "dummy1" goto mangle_PRE_public
|
|
|
bb602c |
+ goto mangle_PRE_public
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([ip], [nat_PREROUTING], 0, [dnl
|
|
|
bb602c |
+ table ip firewalld {
|
|
|
bb602c |
+ chain nat_PREROUTING {
|
|
|
bb602c |
+ jump nat_PREROUTING_ZONES_SOURCE
|
|
|
bb602c |
+ jump nat_PREROUTING_ZONES
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([ip], [nat_PREROUTING_ZONES_SOURCE], 0, [dnl
|
|
|
bb602c |
+ table ip firewalld {
|
|
|
bb602c |
+ chain nat_PREROUTING_ZONES_SOURCE {
|
|
|
bb602c |
+ ip saddr 1.2.3.0/24 goto nat_PRE_trusted
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([ip], [nat_PREROUTING_ZONES], 0, [dnl
|
|
|
bb602c |
+ table ip firewalld {
|
|
|
bb602c |
+ chain nat_PREROUTING_ZONES {
|
|
|
bb602c |
+ iifname "dummy0" goto nat_PRE_trusted
|
|
|
bb602c |
+ iifname "dummy1" goto nat_PRE_public
|
|
|
bb602c |
+ goto nat_PRE_public
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([ip], [nat_POSTROUTING], 0, [dnl
|
|
|
bb602c |
+ table ip firewalld {
|
|
|
bb602c |
+ chain nat_POSTROUTING {
|
|
|
bb602c |
+ jump nat_POSTROUTING_ZONES_SOURCE
|
|
|
bb602c |
+ jump nat_POSTROUTING_ZONES
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([ip], [nat_POSTROUTING_ZONES_SOURCE], 0, [dnl
|
|
|
bb602c |
+ table ip firewalld {
|
|
|
bb602c |
+ chain nat_POSTROUTING_ZONES_SOURCE {
|
|
|
bb602c |
+ ip daddr 1.2.3.0/24 goto nat_POST_trusted
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([ip], [nat_POSTROUTING_ZONES], 0, [dnl
|
|
|
bb602c |
+ table ip firewalld {
|
|
|
bb602c |
+ chain nat_POSTROUTING_ZONES {
|
|
|
bb602c |
+ oifname "dummy0" goto nat_POST_trusted
|
|
|
bb602c |
+ oifname "dummy1" goto nat_POST_public
|
|
|
bb602c |
+ goto nat_POST_public
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([ip6], [nat_PREROUTING], 0, [dnl
|
|
|
bb602c |
+ table ip6 firewalld {
|
|
|
bb602c |
+ chain nat_PREROUTING {
|
|
|
bb602c |
+ jump nat_PREROUTING_ZONES_SOURCE
|
|
|
bb602c |
+ jump nat_PREROUTING_ZONES
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([ip6], [nat_PREROUTING_ZONES_SOURCE], 0, [dnl
|
|
|
bb602c |
+ table ip6 firewalld {
|
|
|
bb602c |
+ chain nat_PREROUTING_ZONES_SOURCE {
|
|
|
bb602c |
+ ip6 saddr dead:beef::/54 goto nat_PRE_public
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([ip6], [nat_PREROUTING_ZONES], 0, [dnl
|
|
|
bb602c |
+ table ip6 firewalld {
|
|
|
bb602c |
+ chain nat_PREROUTING_ZONES {
|
|
|
bb602c |
+ iifname "dummy0" goto nat_PRE_trusted
|
|
|
bb602c |
+ iifname "dummy1" goto nat_PRE_public
|
|
|
bb602c |
+ goto nat_PRE_public
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([ip6], [nat_POSTROUTING], 0, [dnl
|
|
|
bb602c |
+ table ip6 firewalld {
|
|
|
bb602c |
+ chain nat_POSTROUTING {
|
|
|
bb602c |
+ jump nat_POSTROUTING_ZONES_SOURCE
|
|
|
bb602c |
+ jump nat_POSTROUTING_ZONES
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([ip6], [nat_POSTROUTING_ZONES_SOURCE], 0, [dnl
|
|
|
bb602c |
+ table ip6 firewalld {
|
|
|
bb602c |
+ chain nat_POSTROUTING_ZONES_SOURCE {
|
|
|
bb602c |
+ ip6 daddr dead:beef::/54 goto nat_POST_public
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([ip6], [nat_POSTROUTING_ZONES], 0, [dnl
|
|
|
bb602c |
+ table ip6 firewalld {
|
|
|
bb602c |
+ chain nat_POSTROUTING_ZONES {
|
|
|
bb602c |
+ oifname "dummy0" goto nat_POST_trusted
|
|
|
bb602c |
+ oifname "dummy1" goto nat_POST_public
|
|
|
bb602c |
+ goto nat_POST_public
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+
|
|
|
bb602c |
+IPTABLES_LIST_RULES([filter], [INPUT], 0, [dnl
|
|
|
bb602c |
+ ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
|
|
|
bb602c |
+ ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+ INPUT_direct all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+ INPUT_ZONES_SOURCE all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+ INPUT_ZONES all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+ DROP all -- 0.0.0.0/0 0.0.0.0/0 ctstate INVALID
|
|
|
bb602c |
+ REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
|
|
|
bb602c |
+])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([filter], [INPUT_ZONES_SOURCE], 0,
|
|
|
bb602c |
+ [[IN_trusted all -- 1.2.3.0/24 0.0.0.0/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([filter], [INPUT_ZONES], 0,
|
|
|
bb602c |
+ [[IN_trusted all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ IN_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ IN_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([filter], [FORWARD], 0, [dnl
|
|
|
bb602c |
+ ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
|
|
|
bb602c |
+ ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+ FORWARD_direct all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+ FORWARD_IN_ZONES_SOURCE all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+ FORWARD_IN_ZONES all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+ FORWARD_OUT_ZONES_SOURCE all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+ FORWARD_OUT_ZONES all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+ DROP all -- 0.0.0.0/0 0.0.0.0/0 ctstate INVALID
|
|
|
bb602c |
+ REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
|
|
|
bb602c |
+])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([filter], [FORWARD_IN_ZONES_SOURCE], 0,
|
|
|
bb602c |
+ [[FWDI_trusted all -- 1.2.3.0/24 0.0.0.0/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([filter], [FORWARD_IN_ZONES], 0,
|
|
|
bb602c |
+ [[FWDI_trusted all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ FWDI_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ FWDI_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([filter], [FORWARD_OUT_ZONES_SOURCE], 0,
|
|
|
bb602c |
+ [[FWDO_trusted all -- 0.0.0.0/0 1.2.3.0/24 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([filter], [FORWARD_OUT_ZONES], 0,
|
|
|
bb602c |
+ [[FWDO_trusted all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ FWDO_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ FWDO_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([raw], [PREROUTING], 0, [dnl
|
|
|
bb602c |
+ PREROUTING_direct all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+ PREROUTING_ZONES_SOURCE all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+ PREROUTING_ZONES all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([raw], [PREROUTING_ZONES_SOURCE], 0,
|
|
|
bb602c |
+ [[PRE_trusted all -- 1.2.3.0/24 0.0.0.0/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([raw], [PREROUTING_ZONES], 0,
|
|
|
bb602c |
+ [[PRE_trusted all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ PRE_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ PRE_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([mangle], [PREROUTING], 0, [dnl
|
|
|
bb602c |
+ PREROUTING_direct all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+ PREROUTING_ZONES_SOURCE all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+ PREROUTING_ZONES all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([mangle], [PREROUTING_ZONES_SOURCE], 0,
|
|
|
bb602c |
+ [[PRE_trusted all -- 1.2.3.0/24 0.0.0.0/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([mangle], [PREROUTING_ZONES], 0,
|
|
|
bb602c |
+ [[PRE_trusted all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ PRE_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ PRE_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([nat], [PREROUTING], 0, [dnl
|
|
|
bb602c |
+ PREROUTING_direct all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+ PREROUTING_ZONES_SOURCE all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+ PREROUTING_ZONES all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([nat], [PREROUTING_ZONES_SOURCE], 0,
|
|
|
bb602c |
+ [[PRE_trusted all -- 1.2.3.0/24 0.0.0.0/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([nat], [PREROUTING_ZONES], 0,
|
|
|
bb602c |
+ [[PRE_trusted all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ PRE_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ PRE_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([nat], [POSTROUTING], 0, [dnl
|
|
|
bb602c |
+ POSTROUTING_direct all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+ POSTROUTING_ZONES_SOURCE all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+ POSTROUTING_ZONES all -- 0.0.0.0/0 0.0.0.0/0
|
|
|
bb602c |
+])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([nat], [POSTROUTING_ZONES_SOURCE], 0,
|
|
|
bb602c |
+ [[POST_trusted all -- 0.0.0.0/0 1.2.3.0/24 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([nat], [POSTROUTING_ZONES], 0,
|
|
|
bb602c |
+ [[POST_trusted all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ POST_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ POST_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([filter], [INPUT], 0, [dnl
|
|
|
bb602c |
+ ACCEPT all ::/0 ::/0 ctstate RELATED,ESTABLISHED
|
|
|
bb602c |
+ ACCEPT all ::/0 ::/0
|
|
|
bb602c |
+ INPUT_direct all ::/0 ::/0
|
|
|
bb602c |
+ INPUT_ZONES_SOURCE all ::/0 ::/0
|
|
|
bb602c |
+ INPUT_ZONES all ::/0 ::/0
|
|
|
bb602c |
+ DROP all ::/0 ::/0 ctstate INVALID
|
|
|
bb602c |
+ REJECT all ::/0 ::/0 reject-with icmp6-adm-prohibited
|
|
|
bb602c |
+])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([filter], [INPUT_ZONES_SOURCE], 0,
|
|
|
bb602c |
+ [[IN_public all dead:beef::/54 ::/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([filter], [INPUT_ZONES], 0,
|
|
|
bb602c |
+ [[IN_trusted all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ IN_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ IN_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([filter], [FORWARD], 0, [dnl
|
|
|
bb602c |
+ ACCEPT all ::/0 ::/0 ctstate RELATED,ESTABLISHED
|
|
|
bb602c |
+ ACCEPT all ::/0 ::/0
|
|
|
bb602c |
+ FORWARD_direct all ::/0 ::/0
|
|
|
bb602c |
+ FORWARD_IN_ZONES_SOURCE all ::/0 ::/0
|
|
|
bb602c |
+ FORWARD_IN_ZONES all ::/0 ::/0
|
|
|
bb602c |
+ FORWARD_OUT_ZONES_SOURCE all ::/0 ::/0
|
|
|
bb602c |
+ FORWARD_OUT_ZONES all ::/0 ::/0
|
|
|
bb602c |
+ DROP all ::/0 ::/0 ctstate INVALID
|
|
|
bb602c |
+ REJECT all ::/0 ::/0 reject-with icmp6-adm-prohibited
|
|
|
bb602c |
+])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([filter], [FORWARD_IN_ZONES_SOURCE], 0,
|
|
|
bb602c |
+ [[FWDI_public all dead:beef::/54 ::/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([filter], [FORWARD_IN_ZONES], 0,
|
|
|
bb602c |
+ [[FWDI_trusted all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ FWDI_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ FWDI_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([filter], [FORWARD_OUT_ZONES_SOURCE], 0,
|
|
|
bb602c |
+ [[FWDO_public all ::/0 dead:beef::/54 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([filter], [FORWARD_OUT_ZONES], 0,
|
|
|
bb602c |
+ [[FWDO_trusted all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ FWDO_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ FWDO_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([raw], [PREROUTING], 0, [dnl
|
|
|
bb602c |
+ ACCEPT icmpv6 ::/0 ::/0 ipv6-icmptype 134
|
|
|
bb602c |
+ ACCEPT icmpv6 ::/0 ::/0 ipv6-icmptype 135
|
|
|
bb602c |
+ DROP all ::/0 ::/0 rpfilter invert
|
|
|
bb602c |
+ PREROUTING_direct all ::/0 ::/0
|
|
|
bb602c |
+ PREROUTING_ZONES_SOURCE all ::/0 ::/0
|
|
|
bb602c |
+ PREROUTING_ZONES all ::/0 ::/0
|
|
|
bb602c |
+])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([raw], [PREROUTING_ZONES_SOURCE], 0,
|
|
|
bb602c |
+ [[PRE_public all dead:beef::/54 ::/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([raw], [PREROUTING_ZONES], 0,
|
|
|
bb602c |
+ [[PRE_trusted all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ PRE_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ PRE_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([mangle], [PREROUTING], 0, [dnl
|
|
|
bb602c |
+ PREROUTING_direct all ::/0 ::/0
|
|
|
bb602c |
+ PREROUTING_ZONES_SOURCE all ::/0 ::/0
|
|
|
bb602c |
+ PREROUTING_ZONES all ::/0 ::/0
|
|
|
bb602c |
+])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([mangle], [PREROUTING_ZONES_SOURCE], 0,
|
|
|
bb602c |
+ [[PRE_public all dead:beef::/54 ::/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([mangle], [PREROUTING_ZONES], 0,
|
|
|
bb602c |
+ [[PRE_trusted all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ PRE_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ PRE_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([nat], [PREROUTING], 0, [dnl
|
|
|
bb602c |
+ PREROUTING_direct all ::/0 ::/0
|
|
|
bb602c |
+ PREROUTING_ZONES_SOURCE all ::/0 ::/0
|
|
|
bb602c |
+ PREROUTING_ZONES all ::/0 ::/0
|
|
|
bb602c |
+])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([nat], [PREROUTING_ZONES_SOURCE], 0,
|
|
|
bb602c |
+ [[PRE_public all dead:beef::/54 ::/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([nat], [PREROUTING_ZONES], 0,
|
|
|
bb602c |
+ [[PRE_trusted all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ PRE_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ PRE_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([nat], [POSTROUTING], 0, [dnl
|
|
|
bb602c |
+ POSTROUTING_direct all ::/0 ::/0
|
|
|
bb602c |
+ POSTROUTING_ZONES_SOURCE all ::/0 ::/0
|
|
|
bb602c |
+ POSTROUTING_ZONES all ::/0 ::/0
|
|
|
bb602c |
+])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([nat], [POSTROUTING_ZONES_SOURCE], 0,
|
|
|
bb602c |
+ [[POST_public all ::/0 dead:beef::/54 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([nat], [POSTROUTING_ZONES], 0,
|
|
|
bb602c |
+ [[POST_trusted all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ POST_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ POST_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+
|
|
|
bb602c |
+FWD_END_TEST([-e '/WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It will be removed in a future release. Please consider disabling it now./d'])
|
|
|
bb602c |
diff --git a/src/tests/regression/rhbz1734765.at b/src/tests/regression/rhbz1734765.at
|
|
|
bb602c |
index 276c1e433025..60cd18a6a6ea 100644
|
|
|
bb602c |
--- a/src/tests/regression/rhbz1734765.at
|
|
|
bb602c |
+++ b/src/tests/regression/rhbz1734765.at
|
|
|
bb602c |
@@ -1,9 +1,12 @@
|
|
|
bb602c |
FWD_START_TEST([zone sources ordered by name])
|
|
|
bb602c |
-AT_KEYWORDS(zone rhbz1734765 rhbz1421222 gh166 rhbz1738545)
|
|
|
bb602c |
+AT_KEYWORDS(zone rhbz1734765 rhbz1421222 gh166 rhbz1738545 rhbz1772208 rhbz1796055)
|
|
|
bb602c |
dnl
|
|
|
bb602c |
dnl Users depend on firewalld ordering source-based zone dispatch by zone name.
|
|
|
bb602c |
dnl
|
|
|
bb602c |
|
|
|
bb602c |
+AT_CHECK([sed -i 's/^AllowZoneDrifting.*/AllowZoneDrifting=no/' ./firewalld.conf])
|
|
|
bb602c |
+FWD_RELOAD
|
|
|
bb602c |
+
|
|
|
bb602c |
FWD_CHECK([-q --permanent --new-zone=foobar_00])
|
|
|
bb602c |
FWD_CHECK([-q --permanent --new-zone=foobar_05])
|
|
|
bb602c |
FWD_CHECK([-q --permanent --new-zone=foobar_02])
|
|
|
bb602c |
@@ -199,4 +202,178 @@ IP6TABLES_LIST_RULES([nat], [POSTROUTING_ZONES], 0,
|
|
|
bb602c |
]])
|
|
|
bb602c |
])
|
|
|
bb602c |
|
|
|
bb602c |
-FWD_END_TEST
|
|
|
bb602c |
+dnl ##########################################################################
|
|
|
bb602c |
+dnl ##########################################################################
|
|
|
bb602c |
+dnl We also support zone drifting in which source based zones fall through to
|
|
|
bb602c |
+dnl interface based zones (including default zone). So make sure the zones are
|
|
|
bb602c |
+dnl sorted by name in this mode.
|
|
|
bb602c |
+dnl ##########################################################################
|
|
|
bb602c |
+dnl ##########################################################################
|
|
|
bb602c |
+AT_CHECK([sed -i 's/^AllowZoneDrifting.*/AllowZoneDrifting=yes/' ./firewalld.conf])
|
|
|
bb602c |
+FWD_RELOAD
|
|
|
bb602c |
+
|
|
|
bb602c |
+FWD_CHECK([-q --zone=foobar_010 --add-source="10.10.10.10"])
|
|
|
bb602c |
+FWD_CHECK([-q --zone=public --add-source="20.20.20.20"])
|
|
|
bb602c |
+IF_HOST_SUPPORTS_IPV6_RULES([
|
|
|
bb602c |
+FWD_CHECK([-q --zone=foobar_010 --add-source="1234:5678::10:10:10"])
|
|
|
bb602c |
+FWD_CHECK([-q --zone=public --add-source="1234:5678::20:20:20"])
|
|
|
bb602c |
+FWD_CHECK([-q --zone=foobar_012 --add-source ipset:ipsetv6])
|
|
|
bb602c |
+])
|
|
|
bb602c |
+FWD_CHECK([-q --zone=foobar_010 --add-interface=foobar2])
|
|
|
bb602c |
+
|
|
|
bb602c |
+NFT_LIST_RULES([inet], [filter_INPUT_ZONES_SOURCE], 0, [dnl
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain filter_INPUT_ZONES_SOURCE {
|
|
|
bb602c |
+ ip saddr 10.1.1.1 goto filter_IN_foobar_00
|
|
|
bb602c |
+ ip6 saddr 1234:5678::1:1:1 goto filter_IN_foobar_00
|
|
|
bb602c |
+ ip saddr 10.1.1.0/24 goto filter_IN_foobar_01
|
|
|
bb602c |
+ ip6 saddr 1234:5678::1:1:0/112 goto filter_IN_foobar_01
|
|
|
bb602c |
+ ip saddr 10.10.10.10 goto filter_IN_foobar_010
|
|
|
bb602c |
+ ip6 saddr 1234:5678::10:10:10 goto filter_IN_foobar_010
|
|
|
bb602c |
+ ip saddr @ipsetv4 goto filter_IN_foobar_011
|
|
|
bb602c |
+ ip6 saddr @ipsetv6 goto filter_IN_foobar_012
|
|
|
bb602c |
+ ip saddr 10.1.0.0/16 goto filter_IN_foobar_02
|
|
|
bb602c |
+ ip6 saddr 1234:5678::1:0:0/96 goto filter_IN_foobar_02
|
|
|
bb602c |
+ ip saddr 10.2.2.0/24 goto filter_IN_foobar_03
|
|
|
bb602c |
+ ip6 saddr 1234:5678::2:2:0/112 goto filter_IN_foobar_03
|
|
|
bb602c |
+ ip saddr 10.2.0.0/16 goto filter_IN_foobar_04
|
|
|
bb602c |
+ ip6 saddr 1234:5678::2:0:0/96 goto filter_IN_foobar_04
|
|
|
bb602c |
+ ip saddr 10.0.0.0/8 goto filter_IN_foobar_05
|
|
|
bb602c |
+ ip6 saddr 1234:5678::/80 goto filter_IN_foobar_05
|
|
|
bb602c |
+ ip saddr 20.20.20.20 goto filter_IN_public
|
|
|
bb602c |
+ ip6 saddr 1234:5678::20:20:20 goto filter_IN_public
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([inet], [filter_INPUT_ZONES], 0, [dnl
|
|
|
bb602c |
+ table inet firewalld {
|
|
|
bb602c |
+ chain filter_INPUT_ZONES {
|
|
|
bb602c |
+ iifname "foobar2" goto filter_IN_foobar_010
|
|
|
bb602c |
+ iifname "foobar1" goto filter_IN_trusted
|
|
|
bb602c |
+ iifname "foobar0" goto filter_IN_internal
|
|
|
bb602c |
+ goto filter_IN_public
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([ip], [nat_POSTROUTING_ZONES_SOURCE], 0, [dnl
|
|
|
bb602c |
+ table ip firewalld {
|
|
|
bb602c |
+ chain nat_POSTROUTING_ZONES_SOURCE {
|
|
|
bb602c |
+ ip daddr 10.1.1.1 goto nat_POST_foobar_00
|
|
|
bb602c |
+ ip daddr 10.1.1.0/24 goto nat_POST_foobar_01
|
|
|
bb602c |
+ ip daddr 10.10.10.10 goto nat_POST_foobar_010
|
|
|
bb602c |
+ ip daddr @ipsetv4 goto nat_POST_foobar_011
|
|
|
bb602c |
+ ip daddr 10.1.0.0/16 goto nat_POST_foobar_02
|
|
|
bb602c |
+ ip daddr 10.2.2.0/24 goto nat_POST_foobar_03
|
|
|
bb602c |
+ ip daddr 10.2.0.0/16 goto nat_POST_foobar_04
|
|
|
bb602c |
+ ip daddr 10.0.0.0/8 goto nat_POST_foobar_05
|
|
|
bb602c |
+ ip daddr 20.20.20.20 goto nat_POST_public
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([ip], [nat_POSTROUTING_ZONES], 0, [dnl
|
|
|
bb602c |
+ table ip firewalld {
|
|
|
bb602c |
+ chain nat_POSTROUTING_ZONES {
|
|
|
bb602c |
+ oifname "foobar2" goto nat_POST_foobar_010
|
|
|
bb602c |
+ oifname "foobar1" goto nat_POST_trusted
|
|
|
bb602c |
+ oifname "foobar0" goto nat_POST_internal
|
|
|
bb602c |
+ goto nat_POST_public
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([ip6], [nat_POSTROUTING_ZONES_SOURCE], 0, [dnl
|
|
|
bb602c |
+ table ip6 firewalld {
|
|
|
bb602c |
+ chain nat_POSTROUTING_ZONES_SOURCE {
|
|
|
bb602c |
+ ip6 daddr 1234:5678::1:1:1 goto nat_POST_foobar_00
|
|
|
bb602c |
+ ip6 daddr 1234:5678::1:1:0/112 goto nat_POST_foobar_01
|
|
|
bb602c |
+ ip6 daddr 1234:5678::10:10:10 goto nat_POST_foobar_010
|
|
|
bb602c |
+ ip6 daddr @ipsetv6 goto nat_POST_foobar_012
|
|
|
bb602c |
+ ip6 daddr 1234:5678::1:0:0/96 goto nat_POST_foobar_02
|
|
|
bb602c |
+ ip6 daddr 1234:5678::2:2:0/112 goto nat_POST_foobar_03
|
|
|
bb602c |
+ ip6 daddr 1234:5678::2:0:0/96 goto nat_POST_foobar_04
|
|
|
bb602c |
+ ip6 daddr 1234:5678::/80 goto nat_POST_foobar_05
|
|
|
bb602c |
+ ip6 daddr 1234:5678::20:20:20 goto nat_POST_public
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+NFT_LIST_RULES([ip6], [nat_POSTROUTING_ZONES], 0, [dnl
|
|
|
bb602c |
+ table ip6 firewalld {
|
|
|
bb602c |
+ chain nat_POSTROUTING_ZONES {
|
|
|
bb602c |
+ oifname "foobar2" goto nat_POST_foobar_010
|
|
|
bb602c |
+ oifname "foobar1" goto nat_POST_trusted
|
|
|
bb602c |
+ oifname "foobar0" goto nat_POST_internal
|
|
|
bb602c |
+ goto nat_POST_public
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+ }
|
|
|
bb602c |
+])
|
|
|
bb602c |
+
|
|
|
bb602c |
+IPTABLES_LIST_RULES([filter], [INPUT_ZONES_SOURCE], 0,
|
|
|
bb602c |
+ [[IN_foobar_00 all -- 10.1.1.1 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ IN_foobar_01 all -- 10.1.1.0/24 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ IN_foobar_010 all -- 10.10.10.10 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ IN_foobar_011 all -- 0.0.0.0/0 0.0.0.0/0 [goto] match-set ipsetv4 src
|
|
|
bb602c |
+ IN_foobar_02 all -- 10.1.0.0/16 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ IN_foobar_03 all -- 10.2.2.0/24 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ IN_foobar_04 all -- 10.2.0.0/16 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ IN_foobar_05 all -- 10.0.0.0/8 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ IN_public all -- 20.20.20.20 0.0.0.0/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([filter], [INPUT_ZONES], 0,
|
|
|
bb602c |
+ [[IN_foobar_010 all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ IN_trusted all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ IN_internal all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ IN_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([filter], [INPUT_ZONES_SOURCE], 0,
|
|
|
bb602c |
+ [[IN_foobar_00 all 1234:5678::1:1:1 ::/0 [goto]
|
|
|
bb602c |
+ IN_foobar_01 all 1234:5678::1:1:0/112 ::/0 [goto]
|
|
|
bb602c |
+ IN_foobar_010 all 1234:5678::10:10:10 ::/0 [goto]
|
|
|
bb602c |
+ IN_foobar_012 all ::/0 ::/0 [goto] match-set ipsetv6 src
|
|
|
bb602c |
+ IN_foobar_02 all 1234:5678::1:0:0/96 ::/0 [goto]
|
|
|
bb602c |
+ IN_foobar_03 all 1234:5678::2:2:0/112 ::/0 [goto]
|
|
|
bb602c |
+ IN_foobar_04 all 1234:5678::2:0:0/96 ::/0 [goto]
|
|
|
bb602c |
+ IN_foobar_05 all 1234:5678::/80 ::/0 [goto]
|
|
|
bb602c |
+ IN_public all 1234:5678::20:20:20 ::/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([filter], [INPUT_ZONES], 0,
|
|
|
bb602c |
+ [[IN_foobar_010 all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ IN_trusted all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ IN_internal all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ IN_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([nat], [POSTROUTING_ZONES_SOURCE], 0,
|
|
|
bb602c |
+ [[POST_foobar_00 all -- 0.0.0.0/0 10.1.1.1 [goto]
|
|
|
bb602c |
+ POST_foobar_01 all -- 0.0.0.0/0 10.1.1.0/24 [goto]
|
|
|
bb602c |
+ POST_foobar_010 all -- 0.0.0.0/0 10.10.10.10 [goto]
|
|
|
bb602c |
+ POST_foobar_011 all -- 0.0.0.0/0 0.0.0.0/0 [goto] match-set ipsetv4 dst
|
|
|
bb602c |
+ POST_foobar_02 all -- 0.0.0.0/0 10.1.0.0/16 [goto]
|
|
|
bb602c |
+ POST_foobar_03 all -- 0.0.0.0/0 10.2.2.0/24 [goto]
|
|
|
bb602c |
+ POST_foobar_04 all -- 0.0.0.0/0 10.2.0.0/16 [goto]
|
|
|
bb602c |
+ POST_foobar_05 all -- 0.0.0.0/0 10.0.0.0/8 [goto]
|
|
|
bb602c |
+ POST_public all -- 0.0.0.0/0 20.20.20.20 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IPTABLES_LIST_RULES([nat], [POSTROUTING_ZONES], 0,
|
|
|
bb602c |
+ [[POST_foobar_010 all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ POST_trusted all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ POST_internal all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+ POST_public all -- 0.0.0.0/0 0.0.0.0/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([nat], [POSTROUTING_ZONES_SOURCE], 0,
|
|
|
bb602c |
+ [[POST_foobar_00 all ::/0 1234:5678::1:1:1 [goto]
|
|
|
bb602c |
+ POST_foobar_01 all ::/0 1234:5678::1:1:0/112 [goto]
|
|
|
bb602c |
+ POST_foobar_010 all ::/0 1234:5678::10:10:10 [goto]
|
|
|
bb602c |
+ POST_foobar_012 all ::/0 ::/0 [goto] match-set ipsetv6 dst
|
|
|
bb602c |
+ POST_foobar_02 all ::/0 1234:5678::1:0:0/96 [goto]
|
|
|
bb602c |
+ POST_foobar_03 all ::/0 1234:5678::2:2:0/112 [goto]
|
|
|
bb602c |
+ POST_foobar_04 all ::/0 1234:5678::2:0:0/96 [goto]
|
|
|
bb602c |
+ POST_foobar_05 all ::/0 1234:5678::/80 [goto]
|
|
|
bb602c |
+ POST_public all ::/0 1234:5678::20:20:20 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+IP6TABLES_LIST_RULES([nat], [POSTROUTING_ZONES], 0,
|
|
|
bb602c |
+ [[POST_foobar_010 all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ POST_trusted all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ POST_internal all ::/0 ::/0 [goto]
|
|
|
bb602c |
+ POST_public all ::/0 ::/0 [goto]
|
|
|
bb602c |
+]])
|
|
|
bb602c |
+
|
|
|
bb602c |
+FWD_END_TEST([-e '/WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It will be removed in a future release. Please consider disabling it now./d' dnl
|
|
|
bb602c |
+ -e '/WARNING: ZONE_ALREADY_SET:/d'])
|
|
|
bb602c |
--
|
|
|
bb602c |
2.23.0
|
|
|
bb602c |
|