-
Notifications
You must be signed in to change notification settings - Fork 0
/
FWRules.xml
116 lines (105 loc) · 3.19 KB
/
FWRules.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?xml version="1.0" encoding="utf-8"?>
<firewall-definition>
<networks>
<network id="CAN1"/>
<network id="CAN2"/>
<network id="OUTSIDE"/>
</networks>
<rules>
<rule cid="23" id="obd_diag_engine">
<source network="OUTSIDE"/>
<destination network="CAN1"/>
<payload>
<expression>
<operator type="AND">
<byte index="0" value="10"/>
<byte index="1" value-range="2..10"/>
</operator>
</expression>
</payload>
</rule>
<rule cid="23" id="obd_diag_engine_ex">
<source network="OUTSIDE"/>
<destination network="CAN1"/>
<payload>
<expression>
<operator type="AND">
<byte index="6" value="10"/>
<byte index="7" value-range="2..10"/>
<operator type="OR">
<operator type="AND">
<byte index="1" value-range="1..200"/>
<byte index="2" value-range="3..19"/>
</operator>
<operator type="AND">
<byte index="1" value-range="201..220"/>
<byte index="2" value-range="20..25"/>
</operator>
</operator>
</operator>
</expression>
</payload>
</rule>
<rule cid="24" id="obd_diag_lambda">
<source network="OUTSIDE"/>
<destination network="CAN2"/>
<payload>
<byte index="2" value="10"/>
</payload>
</rule>
<rule cid="24" id="obd_diag_lambda_ex">
<source network="OUTSIDE"/>
<destination network="CAN2"/>
<payload>
<byte index="2" value="15"/>
</payload>
</rule>
<rule cid="25" id="obd_diag_m1">
<source network="OUTSIDE"/>
<destination network="CAN2"/>
<payload>
<byte index="3" value="75"/>
<byte index="7" value-range="2..10"/>
</payload>
</rule>
<rule cid="26" id="obd_diag_m2">
<source network="OUTSIDE"/>
<destination network="CAN2"/>
<payload>
<byte index="1" value="13"/>
<byte index="2" value-range="2..5"/>
</payload>
</rule>
<rule cid="27" id="obd_diag_m3">
<source network="OUTSIDE"/>
<destination network="CAN2"/>
<payload>
<byte index="1" value="17"/>
<byte index="2" value-range="2..5"/>
</payload>
</rule>
</rules>
<rule-chains>
<chain cid="23" id="rules-for-cid=23">
<rule id="obd_diag_engine" action="PERMIT-LOG" message="This is a test message that should be written to file!"/>
<rule id="obd_diag_engine_ex" action="DROP"/>
<default action="PERMIT"/>
</chain>
<chain cid="24" id="rules-for-cid=24">
<rule id="obd_diag_lambda" action="DROP" message="This is another message!"/>
<default action="PERMIT"/>
</chain>
</rule-chains>
<state-chains>
<chain id="st-diag-lambda">
<rule id="obd_diag_m1" action="PERMIT"/>
<rule id="obd_diag_m2" action="PERMIT"/>
<rule id="obd_diag_m3" action="PERMIT"/>
<rule id="obd_diag_engine" action="DROP"/>
</chain>
<chain id="st-diag-lambdaxx">
<rule id="obd_diag_lambda_ex" action="PERMIT"/>
<rule id="obd_diag_engine_ex" action="DROP"/>
</chain>
</state-chains>
</firewall-definition>