firewall: Add Host Firewall functionality

Controlled by BALENA_HOST_FIREWALL_MODE, the firewall can
either be 'on' or 'off'.

- In the 'off' state, all traffic is allowed.
- In the 'on' state, only traffic for the core services provided
  by Balena is allowed.

Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io>
This commit is contained in:
Rich Bayliss
2020-06-15 17:46:33 +01:00
parent fc70b1c6f8
commit 28c5a44e71
17 changed files with 930 additions and 210 deletions

View File

@ -41,6 +41,7 @@ const testTarget1 = {
name: 'aDevice',
config: {
HOST_CONFIG_gpu_mem: '256',
HOST_FIREWALL_MODE: 'off',
SUPERVISOR_CONNECTIVITY_CHECK: 'true',
SUPERVISOR_DELTA: 'false',
SUPERVISOR_DELTA_APPLY_TIMEOUT: '0',
@ -127,6 +128,7 @@ const testTargetWithDefaults2 = {
name: 'aDeviceWithDifferentName',
config: {
HOST_CONFIG_gpu_mem: '512',
HOST_FIREWALL_MODE: 'off',
SUPERVISOR_CONNECTIVITY_CHECK: 'true',
SUPERVISOR_DELTA: 'false',
SUPERVISOR_DELTA_APPLY_TIMEOUT: '0',