V4V firewall (viptables) rules
Copyright 2016 by Assured Information Security, Inc. Created by Jean-Edouard Lejosne <lejosnej@ainfosec.com>. This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.
- 1 Location
- 2 Rule management
- 3 Rules
- 3.1 DOM0
- 3.2 UIVM
- 3.3 NDVM
- 3.4 SYNCVM
- 3.5 Regular guests
- 3.6 Stubdomains
Location
V4V firewall rules for the different VM types (and their stubdoms) are defined in VM templates:
https://github.com/OpenXT/manager/tree/master/templates/default
Rule management
The toostack sets the default rule to REJECT.
Since there is no notion of connection state in the Xen V4V code, for each VMA → VMB:port, we have to define 2 ACCEPT rules:
VMA:* → VMB:port
VMB:port → VMA:*
Note: "*" can now be replaced with a pre-defined port (usually port + 10000) to make things safer.
When using a wildcard, if a malicious process in VMB manages to use "port" as its "from" port, then it can access all the VMA V4V services...
Rules
DOM0
can talk to UIVM and NDVM from port 12222 to port 2222
used for: sshv4vcan talk to NDVM from port 15555 to port 5555
used for: dbus (probably network-master talking to network-slave)
UIVM
can talk to DOM0 on port 80
used for: the web UIcan talk to DOM0 on port 2222
used for: sshv4v (ctrl-shift-t)can talk to DOM0 on port 4878
used for: icbinncan talk to DOM0 on port 5555
used for: dbus for UI scripts, see https://github.com/OpenXT/xenclient-oe/tree/master/recipes-openxt/xenclient/xenclient-uivm-xsessionconfigcan talk to DOM0 on port 8080
used for: special web UI requestscan talk to NDVM on port 5555
used for: dbus (nm-applet talking to networkmanager)
NDVM
can talk to DOM0 on port 4878
used for: icbinncan talk to DOM0 on port 5555
used for: dbus (network-slave talking to network-master?)
SYNCVM
can talk to DOM0 on port 4878
used for: icbinn and vhd-util env var LIBVHD_ICBINN_VHD_SERVERcan talk to DOM0 on port 4879
used for: vhd-util env var LIBVHD_ICBINN_KEY_SERVERcan talk to DOM0 on port 5556
used for: dbus (sync-client-daemon issuing dbus commands to xenmgr)
Regular guests
Can't talk to anything
Stubdomains
can talk to DOM0 on port 4001
used for: dmbus service 1can talk to DOM0 on port 4002
used for: dmbus service 2can talk to DOM0 on port 5000
used for: atapi_pt_helpercan talk to DOM0 on port 5001
used for: audio_helpercan talk to DOM0 on port 5100
used for: qmp_helper - proxy QEMU Machine Protocol (QMP) commands