<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">An algorithm for security policy migration in multiple firewall networks</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Manuel</forename><surname>Cheminod</surname></persName>
							<email>manuel.cheminod@ieiit.cnr.it</email>
							<affiliation key="aff0">
								<orgName type="institution" key="instit1">National Research Council of Italy</orgName>
								<orgName type="institution" key="instit2">CNR-IEIIT</orgName>
								<address>
									<addrLine>C.so Duca degli Abruzzi 24</addrLine>
									<postCode>10129</postCode>
									<settlement>Torino</settlement>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Luca</forename><surname>Durante</surname></persName>
							<email>luca.durante@ieiit.cnr.it</email>
							<affiliation key="aff0">
								<orgName type="institution" key="instit1">National Research Council of Italy</orgName>
								<orgName type="institution" key="instit2">CNR-IEIIT</orgName>
								<address>
									<addrLine>C.so Duca degli Abruzzi 24</addrLine>
									<postCode>10129</postCode>
									<settlement>Torino</settlement>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Lucia</forename><surname>Seno</surname></persName>
							<email>lucia.seno@ieiit.cnr.it</email>
							<affiliation key="aff0">
								<orgName type="institution" key="instit1">National Research Council of Italy</orgName>
								<orgName type="institution" key="instit2">CNR-IEIIT</orgName>
								<address>
									<addrLine>C.so Duca degli Abruzzi 24</addrLine>
									<postCode>10129</postCode>
									<settlement>Torino</settlement>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Adriano</forename><surname>Valenzano</surname></persName>
							<email>adriano.valenzano@ieiit.cnr.it</email>
							<affiliation key="aff0">
								<orgName type="institution" key="instit1">National Research Council of Italy</orgName>
								<orgName type="institution" key="instit2">CNR-IEIIT</orgName>
								<address>
									<addrLine>C.so Duca degli Abruzzi 24</addrLine>
									<postCode>10129</postCode>
									<settlement>Torino</settlement>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">An algorithm for security policy migration in multiple firewall networks</title>
					</analytic>
					<monogr>
						<idno type="ISSN">1613-0073</idno>
					</monogr>
					<idno type="MD5">11DED48BBA8D7D5B254E1DC9DF0261F5</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-24T20:06+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<textClass>
				<keywords>
					<term>Firewalls</term>
					<term>Network security</term>
					<term>Policy migration</term>
					<term>Formal methods</term>
				</keywords>
			</textClass>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Firewalls are effectively employed to protect network portions by blocking illegitimate traversing traffic. However, during traffic load peaks, possibly due to DoS-like attacks, they may become performance bottlenecks, introducing consistent delays/losses on legitimate packets. In multiple firewall networks, a cooperative approach to mitigate performance degradation caused by firewall overloads consists in suitably distributing responsibility for security policy implementation among available devices to balance workload. We present a technique for migrating security policies among firewalls in a sequence, formally verified to preserve the overall security policy implemented by the sequence itself. The technique can be used as building block in the development of cooperative solutions allowing to balance workload in networks where firewalls are arbitrarily placed to guard specific domains.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Introduction</head><p>Nowadays firewalls are pervasively deployed over the Internet to protect network portions (or single devices) against undesired/malicious traffic possibly threatening confidentiality, integrity and availability of the provided services. Firewalls implement security policies, which, operatively, translate in lists of rules, each consisting of a condition defined over some packet header fields (filtering fields), and an action. Firewalls operating according to the first matching strategy check incoming packets against rule conditions sequentially, until the matching rule (i.e., the first rule in the list whose condition is satisfied by the packet) is found, and then apply the corresponding action (i.e., typically 𝑎𝑙𝑙𝑜𝑤 or 𝑑𝑒𝑛𝑦).</p><p>Firewall operation also impacts the legitimate traffic and, especially during traffic load peaks (when the average packet arrival rate exceeds the firewall average service rate), legitimate packets may suffer high delays and even be lost before being processed because of overloads and overflows <ref type="bibr" target="#b0">[1,</ref><ref type="bibr" target="#b1">2]</ref>. The time necessary to a firewall for processing a packet is mainly determined by the packet matching time, which is proportional to the number of rules against which the packet is checked before finding the matching one. In general, the higher the firewall cardinality (i.e., the number of rules in the list), the higher the firewall average service time. This criticality is exploited, for example, by DoF (Denial of Firewalling) attacks which generate traffic targeting the last rules in firewall lists <ref type="bibr" target="#b2">[3]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Related works</head><p>Several techniques have been proposed to mitigate firewall impact on legitimate traffic. Some of them aim at minimizing firewall cardinality without changing the implemented security policy (e.g., policy analysis <ref type="bibr" target="#b3">[4,</ref><ref type="bibr" target="#b4">5,</ref><ref type="bibr" target="#b5">6,</ref><ref type="bibr" target="#b6">7]</ref>, firewall compression <ref type="bibr" target="#b7">[8,</ref><ref type="bibr" target="#b8">9]</ref>), and are typically run offline, before actual firewall configuration. Others, lean on the observation that traffic characteristics remain constant for long periods of time and aim at ordering firewall rules so that those with higher matching probability are at the top of the list, allowing the majority of packets to be checked against a small number of rules (rule ordering <ref type="bibr" target="#b9">[10,</ref><ref type="bibr" target="#b10">11,</ref><ref type="bibr" target="#b11">12,</ref><ref type="bibr" target="#b12">13]</ref>). The latter are run online, any time a change in the traffic profile is detected. Although effective, these techniques may not be sufficient to avoid firewall overloads and overflows, especially during traffic load peaks. Indeed, complex security policies may result in hundreds of rules even after analysis/compression. Moreover, compression often leads to lists of highly dependent rules which cannot easily be reordered, limiting the improvements achievable by compression and ordering combined. Finally, if the packet arrival rate increases but the distribution of matching probability among firewall rules does not change consistently, rule ordering is not helpful.</p><p>The technique we propose can be used in combination with all the previously mentioned ones but follows a different approach, i.e., like <ref type="bibr" target="#b13">[14,</ref><ref type="bibr" target="#b14">15,</ref><ref type="bibr" target="#b15">16]</ref>, exploits the presence of multiple firewalls within the protected network. In <ref type="bibr" target="#b13">[14]</ref> a technique to balance workload by dynamically distributing rules among firewalls in a network is described. However, to increase the degrees of freedom in rule deployment, the technique relies on some unused IP header fields, written and checked by firewalls, allowing packets only to be filtered by a fraction of the firewalls they traverse. In <ref type="bibr" target="#b14">[15]</ref>, a solution for migrating rules from a central firewall to decentralized microfirewalls in cloud/cloudlets architectures is presented. However, to preserve the overall security policy implemented in the network, the solution requires a rearrangement of traffic paths after rule migration. Differently from <ref type="bibr" target="#b13">[14]</ref> and <ref type="bibr" target="#b14">[15]</ref>, the technique described in this paper does not imply any modification to firewall or network behavior. The proposed solution resembles the one in <ref type="bibr" target="#b15">[16]</ref>, in that it allows to migrate (part of) the security policy originally implemented by a firewall to downstream ones in the protected network, preserving the overall network security policy. Solution in <ref type="bibr" target="#b15">[16]</ref>, however, relies on the go to action, which allows packets to jump among firewall rules instead of being checked against their conditions sequentially. This paper extends <ref type="bibr" target="#b15">[16]</ref>, as the proposed technique does not rely on the go to construct, and can thus be used in combination with policy analysis, rule ordering and compression algorithms, which are traditionally developed for security policies not including jumps.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Notation and problem definition</head><p>In this section, we define the notation used through the paper, which partially relies on the ones in <ref type="bibr" target="#b7">[8,</ref><ref type="bibr" target="#b15">16]</ref>, and formalize the tackled problem.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1.">Firewalls and firewall sequences</head><p>We call range any non-empty, finite set of consecutive non-negative integers, [𝑎, 𝑏] ⊆ N 0 (with N 0 set of natural numbers including zero). Note that [𝑎, 𝑎] is range only consisting of 𝑎 ∈ N 0 . Firewalls operating a the IP layer filter packets based on the content of five header fields, i.e., source and destination IP address, source and destination port address and protocol number. Formally, a filtering field 𝑃 𝑖 is a range, and source and destination IP address, source and destination port address and protocol number are defined, respectively, as ranges</p><formula xml:id="formula_0">𝑃 1,2 = [0, 2 32 − 1], 𝑃 3,4 = [0, 2 16 − 1], and 𝑃 5 = [0, 2 8 − 1]</formula><p>. Even if we focus on IP-layer firewalls, in the following, we refer to a generic number 𝑛 of filtering fields.</p><p>A packet 𝑝 defined over fields 𝑃 𝑖 , 𝑖 = 1, . . . , 𝑛, is a 𝑛-tuple</p><formula xml:id="formula_1">𝑝 = (𝑝 1 , 𝑝 2 , . . . , 𝑝 𝑛 ), 𝑝 𝑖 ∈ 𝑃 𝑖 , 𝑖 = 1, . . . , 𝑛<label>(1)</label></formula><p>A packet 𝑝 is a point in N 𝑛 0 , and the finite set of all possible packets defined over fields 𝑃 𝑖 , 𝑖 = 1, . . . , 𝑛, 𝒫 = 𝑃 1 × 𝑃 2 × . . . × 𝑃 𝑛 ⊆ N 𝑛 0 , is a hyperrectangle (the generalization of a rectangle in a 𝑛-dimensional space) in N 𝑛 0 . Note that, the Cartesian product of 𝑛 ranges is a set of 𝑛-tuple of integers, i.e., of packets defined over 𝑛 filtering fields.</p><p>A condition defined over fields 𝑃 𝑖 , 𝑖 = 1, . . . , 𝑛, is a 𝑛-tuple</p><formula xml:id="formula_2">𝑐 = (𝐶 1 , 𝐶 2 , . . . , 𝐶 𝑛 )<label>(2)</label></formula><p>where for 𝑖 = 1, . . . , 𝑛, 𝐶 𝑖 is a range such that 𝐶 𝑖 ⊆ 𝑃 𝑖 .</p><p>A rule 𝑟 over fields 𝑃 𝑖 , 𝑖 = 1, . . . , 𝑛, is defined as</p><formula xml:id="formula_3">𝑟 = ⟨𝑐, 𝑎𝑐𝑡𝑖𝑜𝑛⟩<label>(3)</label></formula><p>where 𝑐 is a condition over fields 𝑃 𝑖 , 𝑖 = 1, . . </p><p>where |𝑓 𝑤| is the firewall cardinality. The operation performed by a firewall acting according to the first matching strategy, consists in checking any incoming packet against its rule conditions, sequentially, until the matching rule is found. Then, the matching rule action is applied to the packet, that can be either forwarded (𝑎𝑙𝑙𝑜𝑤), or discarded (𝑑𝑒𝑛𝑦). A packet may match multiple, possibly conflicting (i.e., characterized by different actions), rules within a firewall (dependent rules), in this case the packet fate is determined by the rule order. Note that, we currently focus only on filtering operation, while we do not model other possible firewall functions, e.g., NAT (Network Address Translation).</p><p>A firewall 𝑓 𝑤 is said to be complete if any packet 𝑝 ∈ 𝒫 matches at least one rule in 𝑓 𝑤. We only consider complete firewalls and, to make sure of this, we assume a firewall last rule to be always 𝑟 |𝑓 𝑤| = ⟨(*, *, . . . , *), 𝑎𝑐𝑡𝑖𝑜𝑛⟩, matched by any packet 𝑝 ∈ 𝒫. Under the completeness hypothesis, any firewall 𝑓 𝑤 defines a filtering function 𝑓 𝑓 𝑤 : 𝒫 ∪ {−} → 𝒫 ∪ {−}, that maps any packet 𝑝 ∈ 𝒫 either in itself, if the packet is forwarded, or in −, the null packet, if it is discarded by 𝑓 𝑤. Note that, the domain of 𝑓 𝑓 𝑤 has been extended to the null packet, defining 𝑓 𝑓 𝑤 (−) = − for any firewall. Firewalls characterized by different rule lists may define the same filtering function. In particular, two firewalls 𝑓 𝑤 1 and 𝑓 𝑤 2 are said to be equivalent over 𝒫, or just equivalent (𝑓 𝑤 1 ≡ 𝑓 𝑤 2 ), if they equally map all packets, i.e., if ∀𝑝 ∈ 𝒫, 𝑓 𝑓 𝑤 1 (𝑝) = 𝑓 𝑓 𝑤 2 (𝑝).</p><p>A firewall sequence (see Fig. <ref type="figure" target="#fig_0">1b</ref>) is a tuple of firewalls:</p><formula xml:id="formula_5">𝑓 𝑤𝑠 = (𝑓 𝑤 1 , 𝑓 𝑤 2 , . . . , 𝑓 𝑤 |𝑓 𝑤𝑠| )<label>(5)</label></formula><p>where the number of firewalls |𝑓 𝑤𝑠| is called sequence cardinality. The cumulative filtering operation performed by a firewall sequence (i.e., that defining whether a traversing packet is forwarded at the end of the sequence or discarded by one of the firewall within) can be equated to that of a single firewall. For this reason, analogously to single firewalls, any firewall sequence 𝑓 𝑤𝑠 defines a filtering function 𝑓 𝑓 𝑤𝑠 : 𝒫 ∪ {−} → 𝒫 ∪ {−}, which corresponds to the inverted order composition of the filtering functions defined by the firewalls of the sequence, i.e., which maps any packet</p><formula xml:id="formula_6">𝑝 ∈ 𝒫 in 𝑓 𝑓 𝑤 |𝑓 𝑤𝑠| ∘ . . . ∘ 𝑓 𝑓 𝑤 2 ∘ 𝑓 𝑓 𝑤 1 (𝑝).</formula><p>The definitions of equivalence provided for single firewalls can then be extended to the firewall sequence domain, i.e., two firewall sequences 𝑓 𝑤𝑠 1 and 𝑓 𝑤𝑠 2 are said to be equivalent (𝑓</p><formula xml:id="formula_7">𝑤𝑠 1 ≡ 𝑓 𝑤𝑠 2 ) if ∀𝑝 ∈ 𝒫, 𝑓 𝑓 𝑤𝑠 1 (𝑝) = 𝑓 𝑓 𝑤𝑠 2 (𝑝).</formula><p>Note that a single firewall can be seen as a firewall sequence with only one component. Moreover, as described in detail later, in general, a firewall sequence is not equivalent to a single firewall orderly listing the rules of all firewalls in the sequence.  </p><formula xml:id="formula_8">f w r1 = (C r 1 1 , C r 1 2 , . . . , C r 1 n ), action r 1 r2 = (C r 2 1 , C r 2 2 , . . . , C r 2 n ), action r 2 . . . r |f w| = ( * , * , . . . , * ), action r |f w| (a) f w 1 f w 2 f w |f ws| . . . (b) f w 2 (c) f w 1 C1 C2 C3 C4 C5</formula></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2.">Problem statement</head><p>We consider the problem of moving the security policy implemented by a firewall, so that it is implemented by a downstream firewall in the same sequence, without changing the overall security policy implemented by the sequence itself. Specifically, we focus on network configurations like the one in Fig. <ref type="figure" target="#fig_0">1c</ref>, and consider the following problem:</p><formula xml:id="formula_9">Problem 1. Given a firewall sequence 𝑓 𝑤𝑠 = (𝑓 𝑤 1 , 𝑓 𝑤 2 ), where 𝑓 𝑤 𝑖 = (𝑟 𝑓 𝑤 𝑖 1 , 𝑟 𝑓 𝑤 𝑖 2 , . . . , 𝑟 𝑓 𝑤 𝑖 |𝑓 𝑤 𝑖 | ), 𝑖 = 1, 2, how to compute a firewall 𝑓 𝑤 2 such that sequence 𝑓 𝑤𝑠 = (𝑓 𝑤 1 , 𝑓 𝑤 2 )</formula><p>, where 𝑓 𝑤 1 is the trivial firewall (i.e., the firewall that forwards every packet, 𝑓 𝑤 1 = (⟨(*, *, . . . , *), 𝑎𝑙𝑙𝑜𝑤⟩)), satisfies the following property:</p><formula xml:id="formula_10">𝑓 𝑤𝑠 ≡ 𝑓 𝑤𝑠<label>(6)</label></formula><p>Prob. 1 is a simplified version of the problem we are actually interested in, and allows for an easier technique description. I.e., the ultimate goal is to make 𝑓 𝑤 2 (and/or other firewalls within the protected network) responsible for implementing only part of the security policy originally implemented by 𝑓 𝑤 1 , to balance workload among available devices. Also, we are interested in realistic configurations, where firewalls are not connected in sequences but arbitrarily placed to guard specific network domains. Finally, Prob. 1 only considers downstream policy migration, where the overloaded firewall is the one firstly traversed by traffic. Although an upstream firewall is typically traversed by more packets and thus more likely to suffer from overloads, it is not always so. Situations described above are variations to Prob. 1, and can be solved by extending its solution, i.e., the significance of the proposed technique goes beyond Prob. 1.</p><p>Note that Prob. 1 is not trivial, e.g., defining 𝑓 𝑤 2 by moving rules in 𝑓 𝑤 1 to the top of 𝑓 𝑤 2 is not an admissible solution. Indeed, migrating 𝑎𝑙𝑙𝑜𝑤 rules, in general, makes (6) not satisfied. In 𝑓 𝑤𝑠, a packet matching an 𝑎𝑙𝑙𝑜𝑤 rule in 𝑓 𝑤 1 , is forwarded by the first firewall, but is still subjected to the filtering operation of (i.e., can still be dropped by) 𝑓 𝑤 2 . In 𝑓 𝑤𝑠, where 𝑓 𝑤 2 is defined by listing rules in 𝑓 𝑤 1 before those in 𝑓 𝑤 2 , the same packet is surely forwarded, as the trivial firewall 𝑓 𝑤 1 forwards every packet and the matching rule of the packet in 𝑓 𝑤 2 is the same migrated 𝑎𝑙𝑙𝑜𝑤 rule matched by the packet in 𝑓 𝑤 1 . Thus, the packet is not checked against rules originally in 𝑓 𝑤 2 , possibly violating (6).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Security policy migration technique</head><p>In this section, we describe the proposed technique to solve Prob. 1, and the algorithms defined to implement it.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1.">A solution to Problem 1</head><p>The proposed security policy migration technique is based on the observation that a packet whose matching rule in 𝑓 𝑤 1 is a 𝑑𝑒𝑛𝑦 rule, independently of its matching rule in 𝑓 𝑤 2 , is dropped by 𝑓 𝑤𝑠 and, for <ref type="bibr" target="#b5">(6)</ref> to hold, should be dropped by 𝑓 𝑤𝑠 as well. As a consequence, if we compute a set of 𝑑𝑒𝑛𝑦 rules, which discards all and only packets originally discarded by 𝑓 𝑤 1 , we can move list these rules before those in 𝑓 𝑤 2 to obtain 𝑓 𝑤 2 required by Prob. 1. Formally:</p><formula xml:id="formula_11">Theorem 1. Given Prob. 1, if a set of 𝑑𝑒𝑛𝑦 rules 𝑟 1 , 𝑟 2 , . . . , 𝑟 𝑘 satisfies property 𝑘 ⋃︁ 𝑗=1 𝒮 𝑟 𝑗 = 𝒟 𝑓 𝑤 1 = {𝑝 ∈ 𝒫 | 𝑓 𝑓 𝑤 1 (𝑝) = −}, (<label>7</label></formula><formula xml:id="formula_12">)</formula><p>where 𝒮 𝑟 𝑗 is packet set defined by rule 𝑟 𝑗 and 𝒟 𝑓 𝑤 1 is the set of packets discarded by 𝑓 𝑤 1 , then</p><formula xml:id="formula_13">𝑓 𝑤 2 = (𝑟 1 , . . . , 𝑟 𝑘 , 𝑟 𝑓 𝑤 2 1 , . . . , 𝑟 𝑓 𝑤 2 |𝑓 𝑤 2 | ) (8) is a solution to Prob. 1. (Proof of Thm. 1 is provided in App. A.1.)</formula><p>Note that, in Thm. 1, we refer to a set of rules, instead of a list, as rules 𝑟 1 , 𝑟 2 , . . . , 𝑟 𝑘 all have the same action (𝑑𝑒𝑛𝑦) and thus their relative order in (8) does not matter.</p><p>We now address how to compute a set of 𝑑𝑒𝑛𝑦 rules 𝑟 1 , 𝑟 2 , . . . , 𝑟 𝑘 satisfying <ref type="bibr" target="#b6">(7)</ref>. By definition of firewall operation, 𝒟 𝑓 𝑤 1 consists of packets having as matching rule in 𝑓 𝑤 1 a 𝑑𝑒𝑛𝑦 rule, i.e.,</p><formula xml:id="formula_14">𝒟 𝑓 𝑤 1 = {𝑝 ∈ 𝒫 | ∃ ℓ ∈ 𝐿, 𝑝 ∈ 𝒮 𝑟 𝑓 𝑤 1 ℓ , ∀𝑚 ∈ 𝐼, 𝑚 &lt; ℓ, 𝑝 / ∈ 𝒮 𝑟 𝑓 𝑤 1 𝑚 }<label>(9)</label></formula><p>where 𝐼 and 𝐿 are the sets of indexes, respectively, of all rules and 𝑑𝑒𝑛𝑦 rules in 𝑓 𝑤 1 . From (9), by applying generic set properties, 𝒟 𝑓 𝑤 1 can be expressed in term of packet sets defined by rules in 𝑓 𝑤 1 as (proof in App. A.2)</p><formula xml:id="formula_15">𝒟 𝑓 𝑤 1 = ⋃︁ ℓ∈𝐿 ⎛ ⎝ 𝒮 𝑟 𝑓 𝑤 1 ℓ ∖ ⎛ ⎝ ⋃︁ 𝑚∈𝑀,𝑚&lt;ℓ 𝒮 𝑟 𝑓 𝑤 1 𝑚 ⎞ ⎠ ⎞ ⎠ (10) = ⋃︁ ℓ∈𝐿 (︂ (︁ . . . (︁(︁ 𝒮 𝑟 𝑓 𝑤 1 ℓ ∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 1 )︁ ∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 2 )︁ . . . )︁ ∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 |𝑀 ℓ | )︂<label>(11)</label></formula><p>where, 𝑀 = 𝐼 ∖ 𝐿 is the set of indexes of 𝑎𝑙𝑙𝑜𝑤 rules in 𝑓 𝑤 1 and, for each <ref type="bibr" target="#b10">(11)</ref> as a union of sets, one for each 𝑑𝑒𝑛𝑦 rule 𝑟 𝑓 𝑤 1 ℓ , resulting from sequences of set subtractions, where the result of a subtraction is the minuend of the next one. We want to compute a set of 𝑑𝑒𝑛𝑦 rules 𝑟 1 , 𝑟 2 , . . . , 𝑟 𝑘 such that (7) holds for 𝒟 𝑓 𝑤 1 described by <ref type="bibr" target="#b10">(11)</ref>. Note that, while a packet set defined by a rule (or a union of packet sets defined by rules), can be directly translated into the rule (or set of rules) defining it, the set resulting from the subtraction between two packet set defined by rules (although can be always expressed as a union of hyperrectangles) is not necessarily a single hyperrectangle and cannot directly be translated into a rule set defining it. We thus define a rule subtraction operator, sub_rule(𝑟 𝑑 , 𝑟 𝑎 ), which allows to compute the set of rules defining a set expressed by a subtraction between two packet sets defined by rules. In general, Definition 1. A rule subtraction operator is any operator that given rules 𝑟 𝑑 and 𝑟 𝑎 , returns a, possibly empty, set ℛ of rules, with the same action as 𝑟 𝑑 , such that</p><formula xml:id="formula_16">ℓ ∈ 𝐿, 𝑀 ℓ = {𝑚 1 , 𝑚 2 , . . . , 𝑚 |𝑀 ℓ | } = {𝑚 ∈ 𝑀, 𝑚 &lt; ℓ} is the set of indexes of 𝑎𝑙𝑙𝑜𝑤 rules preceding 𝑑𝑒𝑛𝑦 rule 𝑟 𝑓 𝑤 1 ℓ in 𝑓 𝑤 1 . Set 𝒟 𝑓 𝑤 1 is expressed in</formula><formula xml:id="formula_17">⋃︀ 𝑟∈ℛ 𝒮 𝑟 = 𝒮 𝑟 𝑑 ∖ 𝒮 𝑟𝑎 .</formula><p>Once defined sub_rule(𝑟 𝑑 , 𝑟 𝑎 ), for each ℓ ∈ 𝐿, rule set ℛ</p><formula xml:id="formula_18">𝑚 |𝑀 ℓ | ℓ</formula><p>defining the packet set resulting from the sequence of set subtractions from 𝒮 𝑟 𝑓 𝑤 1 ℓ in <ref type="bibr" target="#b10">(11)</ref>, can be iteratively computed as (proof in App. A.2):</p><formula xml:id="formula_19">ℛ 𝑚 0 ℓ = {𝑟 𝑓 𝑤 1 ℓ }, ℛ 𝑚𝑡 ℓ = ⋃︁ 𝑟∈ℛ 𝑚 𝑡−1 ℓ sub_rule(𝑟, 𝑟 𝑓 𝑤 1 𝑚𝑡 ) 𝑡 = 1, . . . , 𝑚 |𝑀 ℓ |<label>(12)</label></formula><p>Note that, in <ref type="bibr" target="#b10">(11)</ref>, for each ℓ ∈ 𝐿, only the first set subtraction in the sequence is among packet sets defined by rules and (as described in ( <ref type="formula" target="#formula_19">12</ref>)) the set of rules defining it can be computed by using sub_rule(𝑟 𝑑 , 𝑟 𝑎 ) once. The next set subtractions in the sequence require the execution of a rule subtraction for each rule resulting from the previous rule subtraction(s). Rules 𝑟 1 , 𝑟 2 , . . . , 𝑟 𝑘 satisfying <ref type="bibr" target="#b6">(7)</ref> are then those in</p><formula xml:id="formula_20">⋃︀ ℓ∈𝐿 ℛ 𝑚 |𝑀 ℓ | ℓ</formula><p>. As required by Thm. 1, they are all 𝑑𝑒𝑛𝑦 rules, as they result from sequences of rule subtractions from 𝑑𝑒𝑛𝑦 rules 𝑟 𝑓 𝑤 1 ℓ . Fig. <ref type="figure" target="#fig_4">2</ref>  0 correspond to packets forwarded by 𝑓 𝑤 1 , while crossed grey ones to packets dropped by the firewall. Computing a set of 𝑑𝑒𝑛𝑦 rules 𝑟 1 , 𝑟 2 , . . . , 𝑟 𝑘 satisfying (7) means finding a set of rectangles covering all and only crossed grey points in Fig. <ref type="figure" target="#fig_4">2</ref>, which, by <ref type="bibr" target="#b10">(11)</ref>, are those in set</p><formula xml:id="formula_21">𝒟 𝑓 𝑤 1 = 𝒮 𝑟 𝑓 𝑤 1 1 ∪ (︁(︁ 𝒮 𝑟 𝑓 𝑤 1 4 ∖ 𝒮 𝑟 𝑓 𝑤 1 2 )︁ ∖ 𝒮 𝑟 𝑓 𝑤 1 3</formula><p>)︁ . The required set of 𝑑𝑒𝑛𝑦 rules can be computed as ℛ 0 1 ∪ ℛ as described in <ref type="bibr" target="#b11">(12)</ref>. In detail, Alg. 1 initializes a rule set ℛ 𝑚𝑖𝑛 to {𝑟 𝑓 𝑤 1 ℓ } (line 4), checks rules preceding 𝑟 𝑓 𝑤 1 ℓ (line 5), and any time finds an 𝑎𝑙𝑙𝑜𝑤 rule 𝑟 𝑓 𝑤 1 𝑚 (line 6), executes rule subtractions between each rule in ℛ 𝑚𝑖𝑛 and 𝑟 𝑓 𝑤 1 𝑚 (lines 8-10). Routine sub_rule(𝑟 𝑑 , 𝑟 𝑎 ) (line 9) implements the defined rule subtraction operator, and is described in detail in Subsect. 4.2. Rules resulting from rule subtractions having 𝑟 𝑓 𝑤 1 𝑚 as subtrahend are stored in ℛ 𝑡𝑚𝑝 and, subsequently, copied back in ℛ 𝑚𝑖𝑛 to be the new minuend. Once the process is repeated for each 𝑎𝑙𝑙𝑜𝑤 rule</p><formula xml:id="formula_22">𝑟 𝑓 𝑤 1 𝑚 preceding 𝑟 𝑓 𝑤 1 ℓ , ℛ 𝑚𝑖𝑛 is equal to ℛ 𝑚 |𝑀 ℓ | ℓ</formula><p>and Alg. 1 lists the rules it contains in 𝑓 𝑤 2 (line 14).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2.">A rule subtraction operator</head><p>In this subsection, we describe the defined rule subtraction operator, sub_rule(𝑟 𝑑 , 𝑟 𝑎 ), implemented by Alg.      property 𝐶∈𝒞 𝐶 = 𝐶 𝑑 ∖ 𝐶 𝑎 . The range subtraction operator is implemented by Alg. 2, which distinguishes between the four cases in Fig. <ref type="figure" target="#fig_3">3</ref>: if ranges 𝐶 𝑑 and 𝐶 𝑎 are non overlapping (cases captured by line 5 or 9, shown in Fig. <ref type="figure" target="#fig_3">3a</ref>), 𝒞 = {𝐶 𝑑 }, if 𝐶 𝑑 and 𝐶 𝑎 partially overlap (cases captured by line 4 or 8, shown in Fig. <ref type="figure" target="#fig_3">3b</ref>), 𝒞 contains a single range, portion of 𝐶 𝑑 , if 𝐶 𝑎 ⊂ 𝐶 𝑑 (cases captured by both lines 4 and 8, shown in Fig. <ref type="figure" target="#fig_3">3c</ref>), 𝒞 contains two ranges, portions of 𝐶 𝑑 , and, finally, if 𝐶 𝑑 ⊂ 𝐶 𝑎 (none of the above, Fig. <ref type="figure" target="#fig_3">3d</ref>), 𝒞 = ∅.</p><p>Alg. 3 iteratively computes a set 𝒞 1 of conditions defined over 𝑛 filtering fields (lines 3-8), whose elements are used to compute rules of set ℛ (line 9). Set 𝒞 1 is initialized to sub_range(𝐶</p><formula xml:id="formula_23">𝑟 𝑑 1 , 𝐶 𝑟𝑎 1 )</formula><p>and is then updated in 𝑛 − 1 steps (lines 5-8). At each step 𝑘 ∈ [2, 𝑛], 𝒞 1 is obtained as the union of two sets of conditions (line 6). The first set is recursively computed as the Cartesian product of current 𝒞 1 and set containing single range 𝐶 𝑟 𝑑 𝑘 (the result of the Cartesian product between sets of tuple of ranges is a set of tuple of ranges, i.e., of conditions). The second set is computed as the Cartesian product of set containing single condition (𝐶 𝑟 𝑑 1 ∩ 𝐶 𝑟𝑎 1 , . . . , 𝐶 𝑟 𝑑 𝑘−1 ∩ 𝐶 𝑟𝑎 𝑘−1 ), with set of ranges sub_range(𝐶 𝑟 𝑑 𝑛 , 𝐶 𝑟𝑎 𝑛 ). Fig. <ref type="figure" target="#fig_6">4</ref> shows examples of pairs of rules defined over 𝑛 = 2 filtering fields. Considering, e.g., case in Fig. <ref type="figure" target="#fig_6">4c</ref>, <ref type="bibr" target="#b3">4,</ref><ref type="bibr" target="#b5">6]</ref>, and 𝐶 𝑟𝑎 2 = <ref type="bibr" target="#b3">[4,</ref><ref type="bibr" target="#b5">6]</ref>. Initially, Alg. 3 sets</p><formula xml:id="formula_24">𝐶 𝑟 𝑑 1 = [1, 8], 𝐶 𝑟 𝑑 2 = [2, 7], 𝐶 𝑟𝑎 1 = [</formula><formula xml:id="formula_25">𝒞 1 = sub_range(𝐶 𝑟 𝑑 1 , 𝐶 𝑟𝑎 1 ) = {[1, 3], [7, 8]} and 𝒞 2 = {𝐶 𝑟 𝑑 1 ∩ 𝐶 𝑟𝑎 1 } = {[4, 6</formula><p>]}, at step 𝑘 = 2 (the only step since 𝑛 = 2), 𝒞 1 is computed as the union of two sets of conditions. The first is <ref type="bibr" target="#b1">[2,</ref><ref type="bibr" target="#b6">7]</ref>), ( <ref type="bibr" target="#b6">[7,</ref><ref type="bibr" target="#b7">8]</ref>, <ref type="bibr" target="#b1">[2,</ref><ref type="bibr" target="#b6">7]</ref>)}, the second is 𝒞 2 × sub_range(𝐶 <ref type="bibr" target="#b6">[7,</ref><ref type="bibr" target="#b6">7]</ref>)} = {( <ref type="bibr" target="#b3">[4,</ref><ref type="bibr" target="#b5">6]</ref>, <ref type="bibr" target="#b1">[2,</ref><ref type="bibr" target="#b2">3]</ref>), <ref type="bibr">([4, 6]</ref>, <ref type="bibr" target="#b6">[7,</ref><ref type="bibr" target="#b6">7]</ref>)}. Then 𝒞 1 := {( <ref type="bibr" target="#b0">[1,</ref><ref type="bibr" target="#b2">3]</ref>, <ref type="bibr" target="#b1">[2,</ref><ref type="bibr" target="#b6">7]</ref>), ( <ref type="bibr" target="#b6">[7,</ref><ref type="bibr" target="#b7">8]</ref>, <ref type="bibr" target="#b1">[2,</ref><ref type="bibr" target="#b6">7]</ref>), <ref type="bibr">([4, 6]</ref>, <ref type="bibr" target="#b1">[2,</ref><ref type="bibr" target="#b2">3]</ref>), <ref type="bibr">([4, 6]</ref>, <ref type="bibr" target="#b6">[7,</ref><ref type="bibr" target="#b6">7]</ref>)}, from which, since 𝑟 𝑑 is a 𝑑𝑒𝑛𝑦 rule, ℛ = {𝑟 1 = ⟨( <ref type="bibr" target="#b0">[1,</ref><ref type="bibr" target="#b2">3]</ref>, <ref type="bibr" target="#b1">[2,</ref><ref type="bibr" target="#b6">7]</ref>), 𝑑𝑒𝑛𝑦⟩, 𝑟 2 = ⟨( <ref type="bibr" target="#b6">[7,</ref><ref type="bibr" target="#b7">8]</ref>, <ref type="bibr" target="#b1">[2,</ref><ref type="bibr" target="#b6">7]</ref>), 𝑑𝑒𝑛𝑦⟩, 𝑟 3 = ⟨( <ref type="bibr" target="#b3">[4,</ref><ref type="bibr" target="#b5">6]</ref>, <ref type="bibr" target="#b1">[2,</ref><ref type="bibr" target="#b2">3]</ref>), 𝑑𝑒𝑛𝑦⟩, 𝑟 4 = ⟨( <ref type="bibr" target="#b3">[4,</ref><ref type="bibr" target="#b5">6]</ref>, <ref type="bibr" target="#b6">[7,</ref><ref type="bibr" target="#b6">7]</ref>), 𝑑𝑒𝑛𝑦⟩}.</p><formula xml:id="formula_26">𝒞 1 × 𝐶 𝑟 𝑑 2 = {[1, 3], [7, 8]} × {[2, 7]} = {([1, 3],</formula><formula xml:id="formula_27">𝑟 𝑑 2 , 𝐶 𝑟𝑎 2 ) = {[4, 6]} × sub_range([2, 7], [4, 6]) = {[4, 6]} × {[2, 3],</formula><p>In Fig. <ref type="figure" target="#fig_6">4</ref>, rules returned by sub_rule(𝑟 𝑑 , 𝑟 𝑎 ) are listed in the bottom part of tables and shown in red in the plots. The number |ℛ| of resulting rules depends on 𝑟 𝑑 and 𝑟 𝑎 . In particular, when 𝑟 𝑑 and 𝑟 𝑎 are independent, i.e., 𝒮 𝑟 𝑑 and 𝒮 𝑟𝑎 are disjoint (e.g., Fig. <ref type="figure" target="#fig_6">4a</ref>), the result is a single rule equal to 𝑟 𝑑 , if 𝑟 𝑑 and 𝑟 𝑎 are dependent and the corresponding rectangles partially overlap (e.g., Fig. <ref type="figure" target="#fig_6">4b</ref>), |ℛ| ∈ <ref type="bibr" target="#b0">[1,</ref><ref type="bibr" target="#b2">3]</ref>, if 𝑆 𝑟𝑎 ⊂ 𝑆 𝑟 𝑑 (e.g., Fig. <ref type="figure" target="#fig_6">4c</ref>), |ℛ| = 4, and, finally if 𝑟 𝑑 is shadowed by 𝑟 𝑎 , i.e., 𝑆 𝑟 𝑑 ⊂ 𝑆 𝑟𝑎 (e.g., Fig. <ref type="figure" target="#fig_6">4d</ref>), there are no resulting rules, i.e., |ℛ| = 0. In Figs. <ref type="figure" target="#fig_6">4b and 4c</ref>, rules returned by sub_rule(𝑟 𝑑 , 𝑟 𝑎 ) are not contiguous as conditions are defined as tuple of ranges including their extremes and sub_rule(𝑟 𝑑 , 𝑟 𝑎 ) returns independent rules. Other rule subtraction operators can be defined, however sub_rule(𝑟 𝑑 , 𝑟 𝑎 ) guarantees that the number of resulting rules, |ℛ|, is kept to the minimum.</p><p>Fig <ref type="figure" target="#fig_8">5</ref> shows result obtained when security policy migration, implemented by Alg. 1, is applied to example in Fig. <ref type="figure" target="#fig_0">1c</ref>. As can be seen, 𝑓 𝑤 1 is the trivial firewall, while 𝑓 𝑤 2 has been obtained by placing 12 𝑑𝑒𝑛𝑦 rules before those originally in 𝑓 𝑤 2 . Actually, 𝑑𝑒𝑛𝑦 rules at the top of 𝑓 𝑤 2 are the result of a further optimization, as often subsets of rules returned by Alg. 3 can be unified in single rules. As a first observation, expressing the security policy implemented by 𝑓 𝑤 1 with only 𝑑𝑒𝑛𝑦 rules, requires a higher number of rules, which penalizes the cooperating firewall. One way to mitigate this effect is to use compression algorithms on 𝑓 𝑤 2 . As a second observation, the proposed technique can be, in principle, used to move only part of the security policy implemented by 𝑓 𝑤 1 , as by migrating any subset of 𝑑𝑒𝑛𝑦 rules 𝑟 1 , 𝑟 2 , . . . , 𝑟 𝑘 to 𝑓 𝑤 2 , ( <ref type="formula" target="#formula_11">7</ref>) is still satisfied. However, from the performance point of view, a better solution would be to split Algorithm 2: Algorithm for range subtraction. the security policy of 𝑓 𝑤 1 before translating it into 𝑑𝑒𝑛𝑦 rules, so as to minimize the number of rules added to 𝑓 𝑤 2 . This can be done by suitably partitioning 𝒫 and, accordingly, rules in 𝑓 𝑤 1 <ref type="bibr" target="#b15">[16]</ref>, so that a new firewall ̂︁ 𝑓 𝑤 1 is given as a input to Alg. 3. The same approach, as detailed in <ref type="bibr" target="#b15">[16]</ref>, allows to extend the technique to the case of more complex topologies, where firewalls are arbitrarily placed to guard specific domains. Note that, in this case, additional constraints deriving from network topology should be considered in security policy migration.  </p><formula xml:id="formula_28">Data: 𝐶 𝑑 = [𝑎 𝑑 , 𝑏 𝑑 ], 𝐶𝑎 = [𝑎𝑎, 𝑏𝑎], 𝐶 𝑑 , 𝐶𝑎 ⊆ N0. Result: A set of ranges 𝒞, |𝒞| ∈ [0, 2]. 1 Function sub_range(𝐶 𝑑 ,𝐶𝑎): 2 𝒞 ← ∅; /* initialization */ 3 if (𝑎𝑎 &gt; 𝑎 𝑑 ) then 4 if (𝑎𝑎 ≤ 𝑏 𝑑 ) then 𝒞 ← 𝒞 ∪ {[𝑎 𝑑 , 𝑎𝑎 − 1]} ; 5 else 𝒞 ← 𝒞 ∪ {[𝑎 𝑑 , 𝑏 𝑑 ]} ; 6 end 7 if (𝑏𝑎 &lt; 𝑏 𝑑 ) then 8 if (𝑏𝑎 ≥ 𝑎 𝑑 ) then 𝒞 ← 𝒞 ∪ {[𝑏𝑎 + 1, 𝑏 𝑑 ]} ; 9 else 𝒞 ← 𝒞 ∪ {[𝑎 𝑑 , 𝑏 𝑑 ]} ;</formula></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Conclusions</head><p>We presented a technique for migrating security policies along firewalls in a sequence, which is formally verified to preserve the overall security policy implemented by the sequence itself. The proposed technique can be extended to the case of more general topologies comprising firewallprotected domains and is the building block for the development of cooperative solutions balancing workload by distributing filtering responsibility among firewalls available within a protected network. Future work will analyze solutions to compress rule lists obtained after migration in the cooperating firewall, as the proposed technique may lead to rule proliferation. Techniques for suitably partitioning the packet space will also be investigated to split policies based on network/workload characteristics and further optimize network performance. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Appendix</head><formula xml:id="formula_29">𝒟 𝑓 𝑤 1 = ⋃︁ ℓ∈𝐿 ⎛ ⎝ 𝒮 𝑟 𝑓 𝑤 1 ℓ ∖ ⎛ ⎝ ⋃︁ 𝑚∈𝑀,𝑚&lt;ℓ 𝒮 𝑟 𝑓 𝑤 1 𝑚 ⎞ ⎠ ⎞ ⎠ (<label>13</label></formula><formula xml:id="formula_30">)</formula><p>where 𝐿, and 𝑀 are, respectively, is the set of indexes of 𝑑𝑒𝑛𝑦 and 𝑎𝑙𝑙𝑜𝑤 rules in 𝑓 𝑤 1 .</p><p>Proof. By definition of firewall operation, 𝒟 𝑓 𝑤 1 is the set of packets having as a matching rule in 𝑓 𝑤 1 a 𝑑𝑒𝑛𝑦 rule, i.e.,</p><formula xml:id="formula_31">𝒟 1 = {𝑝 ∈ 𝒫 | ∃ ℓ ∈ 𝐿, 𝑝 ∈ 𝒮 𝑟 𝑓 𝑤 1 ℓ , ∀𝑚 ∈ 𝐼, 𝑚 &lt; ℓ, 𝑝 / ∈ 𝒮 𝑟 𝑓 𝑤 1 𝑚 } = ⋃︁ ℓ∈𝐿 ⎛ ⎝ 𝒮 𝑟 𝑓 𝑤 1 ℓ ∖ ⎛ ⎝ ⋃︁ 𝑚∈𝐼,𝑚&lt;ℓ 𝒮 𝑟 𝑓 𝑤 1 𝑚 ⎞ ⎠ ⎞ ⎠<label>(14)</label></formula><p>where 𝐼 = 𝐿∪𝑀 is the set of indexes of all rules in 𝑓 𝑤 </p><formula xml:id="formula_32">𝒮 𝑟 𝑓 𝑤 1 𝑚 ⎞ ⎠ ⎞ ⎠<label>(15)</label></formula><p>since 𝐼 ∖ 𝐿 = 𝑀 , equality (15) proves the thesis. □</p><p>We consider a packet set 𝒟 𝑓 𝑤 1 defined by Proof. Firstly, we prove that 𝒮 𝑟 𝑑 ∖ 𝒮 𝑟𝑎 can be expressed in terms of a union of hyperrectangles, that can be translated in a set ℛ of rules. Then we show that Alg. 3 computes ℛ this way. Given a rule 𝑟 = ⟨(𝐶 1 , 𝐶 2 , . . . , 𝐶 𝑛 ), 𝑎𝑐𝑡𝑖𝑜𝑛⟩, the set of packets matching the rule is 𝒮 𝑟 = 𝐶 1 × 𝐶 2 × . . . × 𝐶 𝑛 ⊆ 𝒫. Note that, any packet set that can be expressed as the Cartesian product of 𝑛 ranges can be defined by a rule having as a condition the 𝑛-tuple of ranges. We </p><formula xml:id="formula_33">𝒟 𝑓 𝑤 1 = ⋃︁ ℓ∈𝐿 (︂ (︁ . . . (︁(︁ 𝒮 𝑟 𝑓 𝑤 1 ℓ ∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 1 )︁ ∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 2 )︁ . . . )︁ ∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 |𝑀 ℓ | )︂<label>(</label></formula></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Figure 1 :</head><label>1</label><figDesc>Figure 1: Examples of firewalls and firewall sequences.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>2 4 S r f w1 3 S 1 = 4 =Figure 2 :</head><label>243142</label><figDesc>Figure 2: Hint on security policy migration for 𝑛 = 2.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head></head><label></label><figDesc>shows a simple clarifying example. Rectangles in the figure correspond to rules 𝑟 𝑓 𝑤 1 𝑗 , 𝑗 = 1, . . . , 4, defined over 𝑛 = 2 filtering fields 𝑃 𝑖 = [0, 9], 𝑖 = 1, 2 and listed in firewall 𝑓 𝑤 1 . The filtering function defined by 𝑓 𝑤 1 , 𝑓 𝑓 𝑤 1 , is represented in Fig. 2 through symbols and colors: dotted white points of N 2</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head>Figure 3 :</head><label>3</label><figDesc>Figure 3: Range subtraction.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_4"><head>2</head><label>2</label><figDesc></figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_5"><head></head><label></label><figDesc>No resulting rules.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_6"><head>Figure 4 :</head><label>4</label><figDesc>Figure 4: Examples of rule subtraction for 𝑛 = 2.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_7"><head>Algorithm 3 : 2 ℛ 1 ∩ 5 for (𝑘 = 2 ; 6 𝒞1 9 forall</head><label>3215269</label><figDesc>Algorithm for rule subtraction in N 𝑛 0 . Data: 𝑟 𝑑 = ⟨(𝐶 𝑟 𝑑 1 , 𝐶 𝑟 𝑑 2 , . . . , 𝐶 𝑟 𝑑 𝑛 ), 𝑎𝑐𝑡𝑖𝑜𝑛 𝑟 𝑑 ⟩, 𝑟𝑎 = ⟨(𝐶 𝑟𝑎 1 , 𝐶 𝑟𝑎 2 , . . . , 𝐶 𝑟𝑎 𝑛 ), 𝑎𝑐𝑡𝑖𝑜𝑛 𝑟𝑎 ⟩ Result: A set ℛ of rules with the same action as 𝑟 𝑑 , |ℛ| ∈ [0, 2𝑛]. 1 Function sub_rule(𝑟 𝑑 ,𝑟𝑎): 𝐶 𝑟𝑎 1 }; /* the intersection of two ranges is always a single range */ 𝑘 ≤ 𝑛; 𝑘 + +) do 𝑐 ∈ 𝒞1 do ℛ ← ℛ ∪ {𝑟 = ⟨𝑐, 𝑎𝑐𝑡𝑖𝑜𝑛 𝑟 𝑑 ⟩} ; 10 return ℛ</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_8"><head>Figure 5 :</head><label>5</label><figDesc>Figure 5: Sequence 𝑓 obtained from example in Fig. 1c after security policy migration.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_9"><head></head><label></label><figDesc>call 𝑘 𝒮 𝑟 , 𝑘 ≤ 𝑛, the projection of 𝒮 𝑟 over set 𝑘 𝒫 ⊆ N 𝑘 0 , where 𝑘 𝒫 is the projection of 𝒫 over N 𝑘 0 :𝑘𝒮 𝑟 = {𝑝 ∈ 𝑘 𝒫 | 𝑝 𝑖 ∈ 𝐶 𝑖 , 𝑖 = 1, . . . , 𝑘} = 𝐶 1 × 𝐶 2 × • • • × 𝐶 𝑘(22)Set 𝑘 𝒮 𝑟 , 𝑘 ≤ 𝑛, is a hyperrectangle in N 𝑘 0 . Given a rule 𝑟 𝑑 , from (22) it holds that</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0"><head></head><label></label><figDesc></figDesc><graphic coords="1,0.00,190.95,595.28,459.99" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head></head><label></label><figDesc>. , 𝑛 and 𝑎𝑐𝑡𝑖𝑜𝑛 varies in the set of all possible firewall actions, i.e., 𝑎𝑐𝑡𝑖𝑜𝑛 ∈ {𝑎𝑙𝑙𝑜𝑤, 𝑑𝑒𝑛𝑦}. From now on, we assume all packets, conditions and rules to be defined over the same filtering fields 𝑃 𝑖 , 𝑖 = 1, . . . , 𝑛. We use symbol * as a possible value for condition components, i.e., 𝐶 𝑖 = * means 𝐶 𝑖 = 𝑃 𝑖 , and the traditional dotted decimal notation for single or ranges of IP addresses. Note, however, that statements like 192.168. * .1 do not define single ranges and are not admissible values for condition components.A packet 𝑝 = (𝑝 1 , 𝑝 2 , . . . , 𝑝 𝑛 ) is said to match a rule 𝑟 = ⟨(𝐶 1 , 𝐶 2 , . . . , 𝐶 𝑛 ), 𝑎𝑐𝑡𝑖𝑜𝑛⟩ if and only if 𝑝 𝑖 ∈ 𝐶 𝑖 , 𝑖 = 1, . . . , 𝑛, i.e., 𝑝 𝑖 ∈ 𝒮 𝑟 = 𝐶 1 × 𝐶 2 × . . . × 𝐶 𝑛 ⊆ 𝒫. Packet set 𝒮 𝑟 , defined by rule 𝑟, is also a hyperrectangle in N 𝑛 0 . A firewall 𝑓 𝑤 (see Fig.1a, where, as in other examples in the paper, condition/action-rule correspondence has been made explicit through superscripts) is a tuple of rules 𝑓 𝑤 = (𝑟 1 , 𝑟 2 , . . . , 𝑟 |𝑓 𝑤| )</figDesc><table /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_2"><head></head><label></label><figDesc>𝑟 𝑓 𝑤 1 3 ), with ℛ 2 4 = sub_rule(𝑟 𝑓 𝑤 1 4 , 𝑟 𝑓 𝑤 1 2 ). Alg. 1, implements the described procedure. The algorithm takes as inputs firewalls 𝑓 𝑤 𝑖 = (𝑟 𝑓 𝑤 𝑖 1 , 𝑟 𝑓 𝑤 𝑖 2 , . . . , 𝑟 𝑓 𝑤 𝑖 |𝑓 𝑤 𝑖 | ), 𝑖 = 1, 2, and returns 𝑓 𝑤 2 , solution to Prob. 1, by computing 𝑑𝑒𝑛𝑦 rules 𝑟 1 , 𝑟 2 , . . . , 𝑟 𝑘 satisfying<ref type="bibr" target="#b6">(7)</ref> and listing them, before rules in 𝑓 𝑤 2 , in 𝑓 𝑤 2 , as in<ref type="bibr" target="#b7">(8)</ref>. Alg. 1 sequentially checks rules in 𝑓 𝑤 1 (line 2), and any time it finds a 𝑑𝑒𝑛𝑦 rule 𝑟 𝑓 𝑤 1</figDesc><table><row><cell cols="2">3 4 , where, based on (12), ℛ 0 1 = {𝑟 𝑓 𝑤 1 1 } and</cell></row><row><cell>ℛ 3 4 = computes rule set 𝑅 ⋃︀ 𝑟∈ℛ 2 4 sub_rule(𝑟, ℓ 𝑚 |𝑀 ℓ | ℓ</cell><cell>(line 3),</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_3"><head>12 end 13 end 14</head><label></label><figDesc>3, employed by Alg. 1. Alg. 3 takes as inputs rules 𝑟 𝑑 = ⟨(𝐶 𝑟 𝑑 1 , 𝐶 𝑟 𝑑 2 , . . . , 𝐶 𝑟 𝑑 𝑛 ), 𝑎𝑐𝑡𝑖𝑜𝑛 𝑟 𝑑 ⟩ and 𝑟 𝑎 = ⟨(𝐶 𝑟𝑎 1 , 𝐶 𝑟𝑎 2 , . . . , 𝐶 𝑟𝑎 𝑛 ), 𝑎𝑐𝑡𝑖𝑜𝑛 𝑟𝑎 ⟩, and returns a set ℛ, |ℛ| ∈ [0, 2𝑛], of rules with the same action as 𝑟 𝑑 , such that ⋃︀ 𝑟∈ℛ 𝒮 𝑟 = 𝒮 𝑟 𝑑 ∖ 𝒮 𝑟𝑎 (proof in App. A.3). Alg. 3 relies on the range subtraction operator, sub_range(𝐶 𝑑 , 𝐶 𝑎 ), which, given two ranges 𝐶 𝑑 = [𝑎 𝑑 , 𝑏 𝑑 ] and 𝐶 𝑎 = [𝑎 𝑎 , 𝑏 𝑎 ], returns the set of ranges 𝒞, of minimal cardinality |𝒞| ∈ [0, 2], satisfying</figDesc><table><row><cell cols="7">Algorithm 1: Security policy migration algorithm</cell></row><row><cell></cell><cell cols="2">Data: 𝑓 𝑤1 = (𝑟 𝑓 𝑤 1 1</cell><cell cols="3">, 𝑟 𝑓 𝑤 1 2</cell><cell>, . . . , 𝑟 𝑓 𝑤 1 |𝑓 𝑤 1 | ) 𝑓 𝑤2 = (𝑟 𝑓 𝑤 2 1</cell><cell>, 𝑟 𝑓 𝑤 2 2</cell><cell>, . . . , 𝑟 𝑓 𝑤 2 |𝑓 𝑤 2 | )</cell></row><row><cell></cell><cell>Result: 𝑓 𝑤 2 = (𝑟</cell><cell cols="2">𝑓 𝑤 2 1</cell><cell>, 𝑟</cell><cell cols="2">𝑓 𝑤 2 2</cell><cell>, . . . , 𝑟</cell><cell>𝑓 𝑤 2 |𝑓 𝑤 2 | )</cell></row><row><cell cols="2">1 𝑓 𝑤 2 ← − ;</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell>/* initialization, firewall with no rules */</cell></row><row><cell cols="7">2 for (ℓ = 1; ℓ ≤ |𝑓 𝑤1|; ℓ + +) do</cell></row><row><cell>3 4</cell><cell cols="6">if (𝑟 𝑓 𝑤 1 ℓ ℛ𝑚𝑖𝑛 ← {𝑟 𝑓 𝑤 1 is a 𝑑𝑒𝑛𝑦 rule) then ℓ };</cell></row><row><cell>5</cell><cell cols="6">for (𝑚 = 1; 𝑚 &lt; ℓ; 𝑚 + +) do</cell></row><row><cell>6</cell><cell cols="3">if (𝑟 𝑓 𝑤 1 𝑚</cell><cell cols="3">is an 𝑎𝑙𝑙𝑜𝑤 rule) then</cell></row><row><cell>7</cell><cell cols="6">ℛ𝑡𝑚𝑝 ← ∅;</cell></row><row><cell>8</cell><cell cols="6">forall 𝑟 ∈ ℛ𝑚𝑖𝑛 do</cell></row><row><cell>9</cell><cell></cell><cell></cell><cell></cell><cell cols="3">ℛ𝑡𝑚𝑝 ← ℛ𝑡𝑚𝑝 ∪ sub_rule(𝑟, 𝑟 𝑓 𝑤 1 𝑚 );</cell></row><row><cell>10</cell><cell cols="4">end</cell><cell></cell></row><row><cell>11</cell><cell cols="6">ℛ𝑚𝑖𝑛 ← ℛ𝑡𝑚𝑝;</cell></row></table><note>append all 𝑟 ∈ ℛ𝑚𝑖𝑛 to 𝑓 𝑤 2 in any order;</note></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_4"><head></head><label></label><figDesc>Resulting is 𝑟 1 = 𝑟 𝑑 .</figDesc><table><row><cell>P2</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell>P2</cell></row><row><cell>4 2 6 8 0</cell><cell cols="7">8 (a) C1 10 C1 C2 action ra [9,11] [1,3] allow rd [1,8] [2,7] deny r1 [1,8] [2,7] deny P1 4 6 ra [7,9] [1,3] allow C2 action rd [1,8] [2,7] deny r1 [1,6] [2,7] deny r2 [7,8] [4,7] deny P1 2 8 10 4 2 6 8 0 4 6 (b) Two resulting rules.</cell></row><row><cell>P2</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell>P2</cell></row><row><cell>8</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell>C1</cell><cell>C2</cell><cell>action</cell><cell>C1</cell><cell>C2</cell><cell>action</cell></row><row><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell cols="3">ra [4,6] [4,6] allow</cell><cell>ra [1,8] [2,7] allow</cell></row><row><cell>6</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell cols="2">rd [1,8] [2,7]</cell><cell>deny</cell><cell>rd [5,7] [4,6]</cell><cell>deny</cell></row><row><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell cols="2">r1 [1,3] [2,7]</cell><cell>deny</cell></row><row><cell>4</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell cols="2">r2 [7,8] [2,7] r3 [4,6] [2,3]</cell><cell>deny deny</cell></row><row><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell cols="2">r4 [4,6] [7,7]</cell><cell>deny</cell></row><row><cell>2</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell>P1</cell><cell></cell><cell>P1</cell></row><row><cell>0</cell><cell>2</cell><cell>4</cell><cell>6</cell><cell>8</cell><cell>10</cell><cell></cell></row><row><cell></cell><cell></cell><cell cols="4">(c) Four resulting</cell><cell></cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_6"><head>1. Proof of Thm. 1</head><label></label><figDesc>Given 𝑓 𝑤𝑠 = (𝑓 𝑤 1 , 𝑓 𝑤 2 ), 𝑓 𝑤 𝑖 = (𝑟 𝑓 𝑤𝑖  1 , 𝑟 𝑓 𝑤 𝑖 2 , . . . , 𝑟 𝑓 𝑤 𝑖 |𝑓 𝑤 𝑖 | ), 𝑖 = 1, 2, and 𝑓 𝑤𝑠 = (𝑓 𝑤 1 , 𝑓 𝑤 2 ), where 𝑓 𝑤 1 = (⟨(*, *, . . . , *), 𝑎𝑙𝑙𝑜𝑤⟩) and 𝑓 𝑤 2 = (𝑟 1 , . . . , 𝑟 𝑘 , 𝑟 𝑓 𝑤 2 1 , . . . , 𝑟 𝑓 𝑤 2 |𝑓 𝑤 2 | ), if 𝑟 1 , . . . , 𝑟 𝑘 are 𝑑𝑒𝑛𝑦 rules such that ⋃︀ 𝑘 𝑗=1 𝒮 𝑟 𝑗 = 𝒟 𝑓 𝑤 1 = {𝑝 ∈ 𝒫 | 𝑓 𝑓 𝑤 1 (𝑝) = −}, then 𝑓 𝑤𝑠 ≡ 𝑓 𝑤𝑠. Proof. By firewall completeness, a partition of 𝒫 is {𝒟 𝑓 𝑤 1 , 𝒜 𝑓 𝑤 1 }, where 𝒟 𝑓 𝑤 1 = {𝑝 ∈ 𝒫 | 𝑓 𝑓 𝑤 1 (𝑝) = −} and 𝒜 𝑓 𝑤 1 = {𝑝 ∈ 𝒫 | 𝑓 𝑓 𝑤 1 (𝑝) = 𝑝} are the sets of packets, respectively, discarded and forwarded by 𝑓 𝑤 1 . By hypothesis, packets in 𝒟 𝑓 𝑤 1 match at least one rule in 𝑟 1 , . . . , 𝑟 𝑘 . Conversely, since 𝒜 𝑓 𝑤 1 and 𝒟 𝑓 𝑤 1 are disjoint sets, packets in 𝒜 𝑓 𝑤 1 do not match any of rules 𝑟 1 , . . . , 𝑟 𝑘 . Packets in 𝒟 𝑓 𝑤 1 are discarded by 𝑓 𝑤𝑠 as, by definition of 𝒟 𝑓 𝑤 1 , they are discarded by 𝑓 𝑤 1 . Equivalently, packets in 𝒟 𝑓 𝑤 1 are discarded by 𝑓 𝑤𝑠, as they are forwarded by the trivial firewall 𝑓 𝑤 1 , but discarded by 𝑓 𝑤 2 , as they match at least one of the 𝑑𝑒𝑛𝑦 rules 𝑟 1 , . . . , 𝑟 𝑘 placed at the top of 𝑓 𝑤 2 . Packets in 𝒜 𝑓 𝑤 1 are forwarded by 𝑓 𝑤 1 by definition of 𝒜 𝑓 𝑤 1 , thus their fate in 𝑓 𝑤𝑠 is determined by 𝑓 𝑤 2 . In 𝑓 𝑤𝑠, packets in 𝒜 𝑓 𝑤 1 are forwarded by the trivial firewall 𝑓 𝑤 1 and their fate is determined by 𝑓 𝑤 2 . However, since packets in 𝒜 𝑓 𝑤 1 do not match any of rules 𝑟 1 , . . . , 𝑟 𝑘 , they have as a matching rule in 𝑓 𝑤 2 the same (𝑎𝑙𝑙𝑜𝑤 or 𝑑𝑒𝑛𝑦) matching rule they have in 𝑓 𝑤 2 , i.e., 𝑓 𝑓 𝑤 2 (𝑝) = 𝑓 𝑓 𝑤 2 (𝑝). Summarizing, ∀𝑝 ∈ 𝒟 𝑓 𝑤 1 , 𝑓 𝑓 𝑤𝑠 (𝑝) = 𝑓 𝑓 𝑤𝑠 (𝑝) = − and ∀𝑝 ∈ 𝒜 𝑓 𝑤 1 , 𝑓 𝑓 𝑤𝑠 (𝑝) = 𝑓 𝑓 𝑤𝑠 (𝑝) = 𝑓 𝑓 𝑤 2 (𝑝). Since {𝒟 𝑓 𝑤 1 , 𝒜 𝑓 𝑤 1 } is a partition of 𝒫, it follows that ∀𝑝 ∈ 𝒫, 𝑓 𝑓 𝑤𝑠 (𝑝) = 𝑓 𝑓 𝑤 (𝑝), i.e., 𝑓 𝑤𝑠 ≡ 𝑓 𝑤𝑠, which proves the thesis. Given a firewall 𝑓 𝑤 1 = (𝑟 𝑓 𝑤 1 1 , 𝑟 𝑓 𝑤 1 2 , . . . , 𝑟 𝑓 𝑤 1 |𝑓 𝑤 1 | ), the set of packets discarded by the firewall, 𝒟 𝑓 𝑤 1 = {𝑝 ∈ 𝒫 | 𝑓 𝑓 𝑤 1 (𝑝) = −}, can be expressed as:</figDesc><table /><note>A.□ A.2. Proofs referenced in Subsect. 4.1</note></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_7"><head></head><label></label><figDesc><ref type="bibr" target="#b0">1</ref> . In<ref type="bibr" target="#b13">(14)</ref>, each set 𝒮 𝑟 𝑓 𝑤 1 𝑚 , defined by a 𝑑𝑒𝑛𝑦 rule in 𝑓 𝑤 1 (i.e., 𝑚 ∈ 𝐿), appearing at least once in the second (internal) set union, also appears once in the first (external) set union. That is, for any term 𝒞 ∖ 𝐿, and 𝒞 and 𝒟 have been used to indicate unions of sets defined by rules in 𝑓 𝑤 1 , there is also a term 𝒮 𝑟 𝑓 𝑤 1 (𝐶 ∖ (ℬ ∪ 𝒟)), which holds for generic sets 𝒜, ℬ, 𝒞, 𝒟, considering 𝒮 𝑟 𝑓 𝑤 1</figDesc><table><row><cell cols="5">(︁ . By set property (𝒜 ∖ ℬ) ∪ (𝒞 ∖ (𝒜 ∪ ℬ ∪ 𝒟)) = ⋃︀ 𝑚&lt;𝑚 (︁ 𝒮 𝑟 𝑓 𝑤 1 𝑚 )︁ ∪ 𝒟 )︁ , ∪ 𝒮 𝑟 𝑓 𝑤 1 𝑚 = 𝒜 and (𝒜 ∖ ℬ) ∪ 𝑚 ∖ (︁ ⋃︀ 𝑚&lt;𝑚 𝒮 𝑟 𝑓 𝑤 1 𝑚 )︁ where 𝑚 ∈ 𝑚 ⋃︀ 𝑚&lt;𝑚 (︁ 𝒮 𝑟 𝑓 𝑤 1 𝑚 )︁ can be neglected any time it appears in the = ℬ, it follows that term 𝒮 𝑟 𝑓 𝑤 1 𝑚 second (internal) set union in (14), i.e.,</cell></row><row><cell></cell><cell></cell><cell>⎛</cell><cell></cell><cell>⎛</cell></row><row><cell>𝒟 𝑓 𝑤 1 =</cell><cell>⋃︁ ℓ∈𝐿</cell><cell>⎝ 𝒮 𝑟 𝑓 𝑤 1 ℓ</cell><cell>∖</cell><cell>⋃︁ 𝑚∈𝐼∖𝐿,𝑚&lt;ℓ ⎝</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_8"><head></head><label></label><figDesc><ref type="bibr" target="#b15">16)</ref> where, in general 𝒮 𝑟 is the packet set defined by a rule 𝑟 and where 𝐿 and 𝑀 are sets of indexes and, for each ℓ ∈ 𝐿, 𝑀 ℓ = {𝑚 1 , 𝑚 2 , . . . , 𝑚 |𝑀 𝑟 𝑓 𝑤 1 𝑚𝑡 ) 𝑡 = 1, . . . , 𝑚 |𝑀 ℓ | (17) where sub_rule(𝑟 𝑑 , 𝑟 𝑎 ) is a rule subtraction operator, want to prove that ⋃︀ 𝑟∈ℛ * 𝒮 𝑟 = 𝒟 𝑓 𝑤 1 Proof. We prove that for each ℓ ∈ 𝐿, rule set ℛ We prove (18), by proving by induction over 𝑡, that for each 𝑡 = 1, . . . , |𝑀 ℓ |, rule set ℛ 𝑚𝑡 ℓ , computed as defined in (17), is such that: Base case (𝑡 = 1): according to (17), ℛ 𝑚 1 𝑓 𝑤 1 𝑚 1 ). By definition of rule subtraction operator, it holds that ⋃︀ 𝒮 𝑟 = 𝒮 𝑟 𝑓 𝑤 1 where the second equality in (21) derives from set property, valid for generic sets 𝒜, ℬ and 𝒜 𝑗 , 𝒜 = ⋃︀ 𝑘 𝑗=1 𝒜 𝑗 ⇒ 𝒜 ∖ 𝐵 = ⋃︀ 𝑘 𝑗=1 (𝒜 𝑗 ∖ ℬ). Since, according to (17), ℛ 𝑚𝑡 𝑟 𝑓 𝑤 1 𝑚𝑡 ), by definition of rule subtraction operator, thesis holds true. □ Alg. 3 implements a rule subtraction operator, i.e., given two rules 𝑟 𝑑 = ⟨(𝐶 𝑟 𝑑 1 , 𝐶 𝑟 𝑑 2 , . . . , , 𝐶 𝑟 𝑑 𝑛 ), 𝑎𝑐𝑡𝑖𝑜𝑛 𝑟 𝑑 ⟩ and 𝑟 𝑎 = ⟨(𝐶 𝑟𝑎 1 , 𝐶 𝑟𝑎 2 , . . . , , 𝐶 𝑟𝑎 𝑛 ), 𝑎𝑐𝑡𝑖𝑜𝑛 𝑟𝑎 ⟩, it returns a set of rules ℛ, with the same action as 𝑟 𝑑 , satisfying property: ⋃︀ 𝑟∈ℛ 𝒮 𝑟 = 𝒮 𝑟 𝑑 ∖ 𝒮 𝑟𝑎 .</figDesc><table><row><cell>From (20), set</cell><cell>(︂ (︁</cell><cell>. . .</cell><cell cols="2">(︁(︁</cell><cell cols="2">𝒮 𝑟 𝑓 𝑤 1 ℓ</cell><cell cols="7">∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 1</cell><cell cols="2">)︁</cell><cell>∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 2</cell><cell>)︁</cell><cell>. . .</cell><cell>)︁</cell><cell>∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 𝑡−1</cell><cell>)︂</cell><cell>∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 𝑡</cell><cell>can be expressed as:</cell></row><row><cell></cell><cell></cell><cell></cell><cell></cell><cell cols="2">⎛</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell cols="2">⎞</cell></row><row><cell></cell><cell></cell><cell></cell><cell></cell><cell cols="7">⎜ ⎝ 𝑟∈ℛ ⋃︁ 𝑚 𝑡−1 ℓ</cell><cell cols="2">𝒮 𝑟</cell><cell cols="3">⎟ ⎠ ∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 𝑡</cell><cell>=</cell><cell>⋃︁ ℓ 𝑟∈ℛ 𝑚 𝑡−1</cell><cell>(︁</cell><cell>𝒮 𝑟 ∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 𝑡</cell><cell>)︁</cell><cell>(21)</cell></row><row><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell>ℓ</cell><cell>=</cell></row><row><cell cols="16">⋃︀ sub_rule(𝑟, A.3. Proof referenced in Subsect. 4.2 𝑟∈ℛ 𝑚 𝑡−1 ℓ</cell></row><row><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell>𝑚 |𝑀 ℓ |</cell></row><row><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell>ℓ</cell></row><row><cell cols="7">is iteratively computed as:</cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row><cell cols="4">ℛ 𝑚 0 ℓ = {𝑟 𝑓 𝑤 1 ℓ</cell><cell cols="2">},</cell><cell></cell><cell cols="7">ℛ 𝑚𝑡 ℓ =</cell><cell cols="2">⋃︁ 𝑟∈ℛ 𝑚 𝑡−1 ℓ</cell><cell>sub_rule(𝑟, 𝑚 |𝑀 ℓ | ℓ , computed as defined in (17), is such that:</cell></row><row><cell></cell><cell cols="5">⋃︁ ℓ 𝑟∈ℛ 𝑚 |𝑀 ℓ |</cell><cell cols="2">𝒮 𝑟 =</cell><cell cols="2">(︁</cell><cell cols="3">. . .</cell><cell cols="3">(︁(︁</cell><cell>𝒮 𝑟 𝑓 𝑤 1 ℓ</cell><cell>∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 1</cell><cell>)︁</cell><cell>∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 2</cell><cell>)︁</cell><cell>. . .</cell><cell>)︁</cell><cell>∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 |𝑀 ℓ |</cell><cell>(18)</cell></row><row><cell></cell><cell></cell><cell cols="4">⋃︁ ℓ 𝑟∈ℛ 𝑚 𝑡</cell><cell cols="2">𝒮 𝑟 =</cell><cell>(︁</cell><cell cols="3">. . .</cell><cell cols="3">(︁(︁</cell><cell>𝒮 𝑟 𝑓 𝑤 1 ℓ</cell><cell>∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 1</cell><cell>)︁</cell><cell>∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 2</cell><cell>)︁</cell><cell>. . .</cell><cell>)︁</cell><cell>∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 𝑡</cell><cell>(19)</cell></row><row><cell cols="9">Induction (𝑡 − 1 ⇒ 𝑡): ℛ 𝑚 𝑡−1 ℓ</cell><cell cols="7">𝑟∈ℛ 𝑚 1 ℓ is such that</cell><cell>ℓ</cell><cell>∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 1</cell><cell>, which proves the thesis.</cell></row><row><cell></cell><cell cols="5">⋃︁ ℓ 𝑟∈ℛ 𝑚 𝑡−1</cell><cell cols="2">𝒮 𝑟 =</cell><cell cols="2">(︁</cell><cell cols="3">. . .</cell><cell cols="3">(︁(︁</cell><cell>𝒮 𝑟 𝑓 𝑤 1 ℓ</cell><cell>∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 1</cell><cell>)︁</cell><cell>∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 2</cell><cell>)︁</cell><cell>. . .</cell><cell>)︁</cell><cell>∖ 𝒮 𝑟 𝑓 𝑤 1 𝑚 𝑡−1</cell><cell>(20)</cell></row></table><note>ℓ | } = {𝑚 ∈ 𝑀, 𝑚 &lt; ℓ} is the set of indexes in 𝑀 preceding ℓ. We then consider, rule set ℛ * = ⋃︀ ℓ∈𝐿 ℛ 𝑚 |𝑀 ℓ | ℓ, where for each ℓ ∈ 𝐿 rule setℛ ℓ = sub_rule(𝑟 𝑓 𝑤 1 ℓ , 𝑟</note></figure>
		</body>
		<back>

			<div type="acknowledgement">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.">Acknowledgments</head><p>This work was supported in part by the EU H2020-SU-ICT-03-2018 Project No. 830929 Cyber-Sec4Europe (cybersec4europe.eu).</p></div>
			</div>

			<div type="annex">
<div xmlns="http://www.tei-c.org/ns/1.0"><p>𝒮 𝑟𝑎 ), we obtain:</p><p>and by using (23) we obtain</p><p>We can rewrite ((</p><p>Since sets 𝑘 𝒮 𝑟 , 𝑘 ≤ 𝑛 are hyperrectangles, it holds that <ref type="formula">26</ref>), we can rewrite the second term in union (25) as:</p><p>where the last equality is obtained by using again set property 𝒜 ∖ ℬ = 𝒜 ∖ (𝒜 ∩ ℬ). Summarizing, from ( <ref type="formula">25</ref>) and ( <ref type="formula">27</ref>) we have that:</p><p>To translate set (28) into a set of rules defining it, we prove, by induction over 𝑘, that (28) can be expressed as a set of sets of the kind 𝐶 1 × 𝐶 2 × . . . 𝐶 𝑛 (i.e., of hyperrectangles).</p><p>Base case (𝑘 = 1):</p><p>, which returns a set of ranges (i.e., of hyperrectangles in N 1 0 ).</p><p>𝒮 𝑟𝑎 to be expressed as a set of hyperrectangles. The first term in union (28), is then a hyperrectangle. The second term in union in union ( <ref type="formula">28</ref>) is </p></div>			</div>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Performance evaluation and modeling of an industrial application-layer firewall</title>
		<author>
			<persName><forename type="first">M</forename><surname>Cheminod</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Durante</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Seno</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Valenzano</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">IEEE Trans. Ind. Informat</title>
		<imprint>
			<biblScope unit="volume">14</biblScope>
			<biblScope unit="page" from="2159" to="2170" />
			<date type="published" when="2018">2018</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">Performance modeling and analysis of network firewalls</title>
		<author>
			<persName><forename type="first">K</forename><surname>Salah</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Elbadawi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Boutaba</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">IEEE Trans. Netw. Service Manag</title>
		<imprint>
			<biblScope unit="volume">9</biblScope>
			<biblScope unit="page" from="12" to="21" />
			<date type="published" when="2012">2012</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Resiliency of open-source firewalls against remote discovery of last-matching rules</title>
		<author>
			<persName><forename type="first">K</forename><surname>Salah</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Sattar</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Z</forename><surname>Baig</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Sqalli</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Calyam</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. Int. Conf. on Security of Information and Networks (SIN)</title>
				<meeting>Int. Conf. on Security of Information and Networks (SIN)</meeting>
		<imprint>
			<date type="published" when="2009">2009</date>
			<biblScope unit="page" from="186" to="192" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">FWS: Analyzing, maintaining and transcompiling firewalls</title>
		<author>
			<persName><forename type="first">C</forename><surname>Bodei</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Ceragioli</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Degano</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Focardi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Galletta</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Luccio</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Tempesta</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Veronese</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">J. Comp. Sec</title>
		<imprint>
			<biblScope unit="volume">29</biblScope>
			<biblScope unit="page" from="77" to="134" />
			<date type="published" when="2021">2021</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">Methods and tools for policy analysis</title>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">A</forename><surname>Jabal</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Davari</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Bertino</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Makaya</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Calo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Verma</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Russo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Williams</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">ACM Comput. Surv</title>
		<imprint>
			<biblScope unit="volume">51</biblScope>
			<date type="published" when="2019">2019</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">A formal model of network policy analysis</title>
		<author>
			<persName><forename type="first">F</forename><surname>Valenza</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Spinoso</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Basile</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Sisto</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Lioy</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. IEEE Int. Forum on Research and Technologies for Society and Industry Leveraging a better tomorrow (RTSI)</title>
				<meeting>IEEE Int. Forum on Research and Technologies for Society and Industry Leveraging a better tomorrow (RTSI)</meeting>
		<imprint>
			<date type="published" when="2015">2015</date>
			<biblScope unit="page" from="516" to="522" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">Conflict Classification and Analysis of Distributed Firewall Policies</title>
		<author>
			<persName><forename type="first">E</forename><surname>Al-Shaer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><surname>Hamed</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Boutaba</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><forename type="middle">Z</forename><surname>Hasan</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">IEEE J. Sel. Areas Commun</title>
		<imprint>
			<biblScope unit="volume">23</biblScope>
			<biblScope unit="page" from="2069" to="2084" />
			<date type="published" when="2005">2005</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">Firewall Compressor: An Algorithm for Minimizing Firewall Policies</title>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">X</forename><surname>Liu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Torng</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">R</forename><surname>Meiners</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. IEEE Conf. on Comp. Comm. (INFOCOM)</title>
				<meeting>IEEE Conf. on Comp. Comm. (INFOCOM)</meeting>
		<imprint>
			<date type="published" when="2008">2008</date>
			<biblScope unit="page" from="176" to="180" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">FPC: A new approach to firewall policies compression</title>
		<author>
			<persName><forename type="first">Y</forename><surname>Cheng</surname></persName>
		</author>
		<author>
			<persName><forename type="first">W</forename><surname>Wang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Wang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><surname>Wang</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Tsinghua Science and Technology</title>
		<imprint>
			<biblScope unit="volume">24</biblScope>
			<biblScope unit="page" from="65" to="76" />
			<date type="published" when="2019">2019</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<analytic>
		<title level="a" type="main">Optimization of network firewall policies using ordered sets and directed acyclical graphs</title>
		<author>
			<persName><forename type="first">E</forename><forename type="middle">W</forename><surname>Fulp</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of IEEE Internet Management Conference</title>
				<meeting>of IEEE Internet Management Conference</meeting>
		<imprint>
			<date type="published" when="2005">2005</date>
			<biblScope unit="page" from="1" to="4" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<analytic>
		<title level="a" type="main">Dynamic rule-ordering optimization for high-speed firewall filtering</title>
		<author>
			<persName><forename type="first">H</forename><surname>Hamed</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Al-Shaer</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. ACM Symp. on Inf. Comp. and Comm. Sec. (ASIACCS)</title>
				<meeting>ACM Symp. on Inf. Comp. and Comm. Sec. (ASIACCS)</meeting>
		<imprint>
			<date type="published" when="2006">2006</date>
			<biblScope unit="page" from="332" to="342" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b11">
	<analytic>
		<title level="a" type="main">On optimizing firewall performance in dynamic networks by invoking a novel swapping window-based paradigm</title>
		<author>
			<persName><forename type="first">R</forename><surname>Mohan</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Yazidi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Feng</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Oommen</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Int. J. Commun. Syst</title>
		<imprint>
			<biblScope unit="volume">31</biblScope>
			<biblScope unit="page">e3773</biblScope>
			<date type="published" when="2018">2018</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b12">
	<analytic>
		<title level="a" type="main">A heuristic algorithm for relaxed optimal rule ordering problem</title>
		<author>
			<persName><forename type="first">T</forename><surname>Harada</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Tanaka</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Mikawa</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of Cyber Security in Networking Conference (CSNet)</title>
				<meeting>of Cyber Security in Networking Conference (CSNet)</meeting>
		<imprint>
			<date type="published" when="2018">2018</date>
			<biblScope unit="page" from="1" to="8" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b13">
	<analytic>
		<title level="a" type="main">Dynamic balancing of packet filtering workloads on distributed firewalls</title>
		<author>
			<persName><forename type="first">G</forename><surname>Yan</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Chen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Eidenbenz</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of IEEE Int. Workshop on QoS (IWQoS)</title>
				<meeting>of IEEE Int. Workshop on QoS (IWQoS)</meeting>
		<imprint>
			<date type="published" when="2008">2008</date>
			<biblScope unit="page" from="209" to="218" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b14">
	<analytic>
		<title level="a" type="main">Dynamic firewall decomposition and composition in the cloud</title>
		<author>
			<persName><forename type="first">S</forename><surname>Bagheri</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Shameli-Sendi</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">IEEE Trans. Inf. Forensics Security</title>
		<imprint>
			<biblScope unit="volume">15</biblScope>
			<biblScope unit="page" from="3526" to="3539" />
			<date type="published" when="2020">2020</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b15">
	<analytic>
		<title level="a" type="main">A formal model and technique to redistribute the packet filtering load in multiple firewall networks</title>
		<author>
			<persName><forename type="first">L</forename><surname>Durante</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Seno</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Valenzano</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">IEEE Trans. Inf. Forensics Security</title>
		<imprint>
			<biblScope unit="volume">16</biblScope>
			<biblScope unit="page" from="2637" to="2651" />
			<date type="published" when="2021">2021</date>
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
