From 20551379e8e2b4b6e342b39ea67738876e559bbf Mon Sep 17 00:00:00 2001 From: Nicolas Fort Date: Wed, 24 Jul 2024 14:08:19 +0000 Subject: T4072: firewall: extend firewall bridge capabilities, in order to include new chains, priorities, and firewall groups --- .../include/firewall/address-inet.xml.i | 63 ++++++++++++++ .../include/firewall/address-mask-inet.xml.i | 19 +++++ .../include/firewall/bridge-custom-name.xml.i | 5 ++ .../include/firewall/bridge-hook-forward.xml.i | 5 ++ .../include/firewall/bridge-hook-input.xml.i | 39 +++++++++ .../include/firewall/bridge-hook-output.xml.i | 39 +++++++++ .../include/firewall/bridge-hook-prerouting.xml.i | 37 +++++++++ .../include/firewall/common-rule-bridge.xml.i | 33 ++++++-- .../firewall/set-packet-modifications.xml.i | 78 ++++++++++++++++++ .../firewall/source-destination-group-inet.xml.i | 50 ++++++++++++ .../include/policy/route-common.xml.i | 95 +--------------------- 11 files changed, 363 insertions(+), 100 deletions(-) create mode 100644 interface-definitions/include/firewall/address-inet.xml.i create mode 100644 interface-definitions/include/firewall/address-mask-inet.xml.i create mode 100644 interface-definitions/include/firewall/bridge-hook-input.xml.i create mode 100644 interface-definitions/include/firewall/bridge-hook-output.xml.i create mode 100644 interface-definitions/include/firewall/bridge-hook-prerouting.xml.i create mode 100644 interface-definitions/include/firewall/set-packet-modifications.xml.i create mode 100644 interface-definitions/include/firewall/source-destination-group-inet.xml.i (limited to 'interface-definitions/include') diff --git a/interface-definitions/include/firewall/address-inet.xml.i b/interface-definitions/include/firewall/address-inet.xml.i new file mode 100644 index 000000000..02ed8f6e4 --- /dev/null +++ b/interface-definitions/include/firewall/address-inet.xml.i @@ -0,0 +1,63 @@ + + + + IP address, subnet, or range + + ipv4 + IPv4 address to match + + + ipv4net + IPv4 prefix to match + + + ipv4range + IPv4 address range to match + + + !ipv4 + Match everything except the specified address + + + !ipv4net + Match everything except the specified prefix + + + !ipv4range + Match everything except the specified range + + + ipv6net + Subnet to match + + + ipv6range + IP range to match + + + !ipv6 + Match everything except the specified address + + + !ipv6net + Match everything except the specified prefix + + + !ipv6range + Match everything except the specified range + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/interface-definitions/include/firewall/address-mask-inet.xml.i b/interface-definitions/include/firewall/address-mask-inet.xml.i new file mode 100644 index 000000000..e2a5927ab --- /dev/null +++ b/interface-definitions/include/firewall/address-mask-inet.xml.i @@ -0,0 +1,19 @@ + + + + IP mask + + ipv4 + IPv4 mask to apply + + + ipv6 + IP mask to apply + + + + + + + + \ No newline at end of file diff --git a/interface-definitions/include/firewall/bridge-custom-name.xml.i b/interface-definitions/include/firewall/bridge-custom-name.xml.i index 654493c0e..48d48949e 100644 --- a/interface-definitions/include/firewall/bridge-custom-name.xml.i +++ b/interface-definitions/include/firewall/bridge-custom-name.xml.i @@ -32,6 +32,11 @@ #include + #include + #include + #include + #include + #include diff --git a/interface-definitions/include/firewall/bridge-hook-forward.xml.i b/interface-definitions/include/firewall/bridge-hook-forward.xml.i index 99f66ec77..0bc1fc357 100644 --- a/interface-definitions/include/firewall/bridge-hook-forward.xml.i +++ b/interface-definitions/include/firewall/bridge-hook-forward.xml.i @@ -26,6 +26,11 @@ #include + #include + #include + #include + #include + #include diff --git a/interface-definitions/include/firewall/bridge-hook-input.xml.i b/interface-definitions/include/firewall/bridge-hook-input.xml.i new file mode 100644 index 000000000..32de14d54 --- /dev/null +++ b/interface-definitions/include/firewall/bridge-hook-input.xml.i @@ -0,0 +1,39 @@ + + + + Bridge input firewall + + + + + Bridge firewall input filter + + + #include + #include + #include + + + Bridge Firewall input filter rule number + + u32:1-999999 + Number for this firewall rule + + + + + Firewall rule number must be between 1 and 999999 + + + #include + #include + #include + #include + #include + + + + + + + diff --git a/interface-definitions/include/firewall/bridge-hook-output.xml.i b/interface-definitions/include/firewall/bridge-hook-output.xml.i new file mode 100644 index 000000000..da0c02470 --- /dev/null +++ b/interface-definitions/include/firewall/bridge-hook-output.xml.i @@ -0,0 +1,39 @@ + + + + Bridge output firewall + + + + + Bridge firewall output filter + + + #include + #include + #include + + + Bridge Firewall output filter rule number + + u32:1-999999 + Number for this firewall rule + + + + + Firewall rule number must be between 1 and 999999 + + + #include + #include + #include + #include + #include + + + + + + + diff --git a/interface-definitions/include/firewall/bridge-hook-prerouting.xml.i b/interface-definitions/include/firewall/bridge-hook-prerouting.xml.i new file mode 100644 index 000000000..b6c1fe87a --- /dev/null +++ b/interface-definitions/include/firewall/bridge-hook-prerouting.xml.i @@ -0,0 +1,37 @@ + + + + Bridge prerouting firewall + + + + + Bridge firewall prerouting filter + + + #include + #include + #include + + + Bridge Firewall prerouting filter rule number + + u32:1-999999 + Number for this firewall rule + + + + + Firewall rule number must be between 1 and 999999 + + + #include + #include + #include + + + + + + + diff --git a/interface-definitions/include/firewall/common-rule-bridge.xml.i b/interface-definitions/include/firewall/common-rule-bridge.xml.i index dcdd970ac..b47408aa8 100644 --- a/interface-definitions/include/firewall/common-rule-bridge.xml.i +++ b/interface-definitions/include/firewall/common-rule-bridge.xml.i @@ -1,15 +1,37 @@ +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include Destination parameters #include + #include + #include + #include + #include -#include Set jump target. Action jump must be defined to use this setting @@ -18,17 +40,16 @@ -#include -#include Source parameters #include + #include + #include + #include + #include -#include -#include -#include diff --git a/interface-definitions/include/firewall/set-packet-modifications.xml.i b/interface-definitions/include/firewall/set-packet-modifications.xml.i new file mode 100644 index 000000000..eda568a0e --- /dev/null +++ b/interface-definitions/include/firewall/set-packet-modifications.xml.i @@ -0,0 +1,78 @@ + + + + Packet modifications + + + + + Connection marking + + u32:0-2147483647 + Connection marking + + + + + + + + + Packet Differentiated Services Codepoint (DSCP) + + u32:0-63 + DSCP number + + + + + + + + + Packet marking + + u32:1-2147483647 + Packet marking + + + + + + + + + Routing table to forward packet with + + u32:1-200 + Table number + + + main + Main table + + + + (main) + + + main + protocols static table + + + + + + TCP Maximum Segment Size + + u32:500-1460 + Explicitly set TCP MSS value + + + + + + + + + \ No newline at end of file diff --git a/interface-definitions/include/firewall/source-destination-group-inet.xml.i b/interface-definitions/include/firewall/source-destination-group-inet.xml.i new file mode 100644 index 000000000..174051624 --- /dev/null +++ b/interface-definitions/include/firewall/source-destination-group-inet.xml.i @@ -0,0 +1,50 @@ + + + + Group + + + + + Group of IPv4 addresses + + firewall group address-group + + + + + + Group of IPv6 addresses + + firewall group ipv6-address-group + + + + #include + + + Group of IPv4 networks + + firewall group network-group + + + + + + Group of IPv6 networks + + firewall group ipv6-network-group + + + + + + Group of ports + + firewall group port-group + + + + + + diff --git a/interface-definitions/include/policy/route-common.xml.i b/interface-definitions/include/policy/route-common.xml.i index 203be73e7..19ffc0506 100644 --- a/interface-definitions/include/policy/route-common.xml.i +++ b/interface-definitions/include/policy/route-common.xml.i @@ -66,100 +66,7 @@ - - - Packet modifications - - - - - Connection marking - - u32:0-2147483647 - Connection marking - - - - - - - - - Packet Differentiated Services Codepoint (DSCP) - - u32:0-63 - DSCP number - - - - - - - - - Packet marking - - u32:1-2147483647 - Packet marking - - - - - - - - - Routing table to forward packet with - - u32:1-200 - Table number - - - main - Main table - - - - (main) - - - main - protocols static table - - - - - - VRF to forward packet with - - txt - VRF instance name - - - default - Forward into default global VRF - - - default - vrf name - - #include - - - - - TCP Maximum Segment Size - - u32:500-1460 - Explicitly set TCP MSS value - - - - - - - - +#include #include #include #include -- cgit v1.2.3