File: example-2.xml

package info (click to toggle)
libvirt 12.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 217,244 kB
  • sloc: ansic: 540,423; xml: 355,215; python: 12,060; perl: 2,626; sh: 2,179; makefile: 448; javascript: 126; cpp: 22
file content (37 lines) | stat: -rw-r--r-- 1,217 bytes parent folder | download | duplicates (15)
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
<filter name='testcase'>
  <uuid>01a992d2-f8c8-7c27-f69b-ab0a9d377379</uuid>

  <!-- VM outgoing: allow all established and related connections -->
  <rule action='accept' direction='out' priority='100'>
    <all state='ESTABLISHED,RELATED'
         comment='out: existing and related (ftp) connections'/>
  </rule>

  <!-- VM incoming: allow all established connections -->
  <rule action='accept' direction='in' priority='100'>
    <all state='ESTABLISHED'
         comment='in: existing connections'/>
  </rule>

  <!-- allow incoming ssh and ftp traffic -->
  <rule action='accept' direction='in' priority='200'>
    <tcp dstportstart='21' dstportend='22' state='NEW'
         comment='in: ftp and ssh'/>
  </rule>

  <!-- allow incoming ICMP (ping) packets -->
  <rule action='accept' direction='in' priority='300'>
    <icmp state='NEW' comment='in: icmp'/>
  </rule>

  <!-- allow outgong DNS lookups -->
  <rule action='accept' direction='out' priority='300'>
    <udp dstportstart='53' state='NEW' comment='out: DNS lookups'/>
  </rule>

  <!-- drop all other traffic -->
  <rule action='drop' direction='inout' priority='1000'>
    <all comment='inout: drop all non-accepted traffic'/>
  </rule>

</filter>