]> git.proxmox.com Git - mirror_lxc.git/blame - config/templates/common.conf.in
Merge pull request #1544 from brauner/2017-05-08/harden_console_handling
[mirror_lxc.git] / config / templates / common.conf.in
CommitLineData
5b99af00
SG
1# Default configuration shared by all containers
2
3# Setup the LXC devices in /dev/lxc/
4lxc.devttydir = lxc
5
6# Allow for 1024 pseudo terminals
7lxc.pts = 1024
8
9# Setup 4 tty devices
10lxc.tty = 4
11
12# Drop some harmful capabilities
4845c17a 13lxc.cap.drop = mac_admin mac_override sys_time sys_module sys_rawio
5b99af00
SG
14
15# Set the pivot directory
16lxc.pivotdir = lxc_putold
17
18# Ensure hostname is changed on clone
19lxc.hook.clone = @LXCHOOKDIR@/clonehostname
20
21# CGroup whitelist
22lxc.cgroup.devices.deny = a
23## Allow any mknod (but not reading/writing the node)
24lxc.cgroup.devices.allow = c *:* m
25lxc.cgroup.devices.allow = b *:* m
26## Allow specific devices
de9a4bfc
SG
27### /dev/null
28lxc.cgroup.devices.allow = c 1:3 rwm
29### /dev/zero
30lxc.cgroup.devices.allow = c 1:5 rwm
31### /dev/full
32lxc.cgroup.devices.allow = c 1:7 rwm
33### /dev/tty
34lxc.cgroup.devices.allow = c 5:0 rwm
35### /dev/console
36lxc.cgroup.devices.allow = c 5:1 rwm
37### /dev/ptmx
38lxc.cgroup.devices.allow = c 5:2 rwm
39### /dev/random
40lxc.cgroup.devices.allow = c 1:8 rwm
41### /dev/urandom
42lxc.cgroup.devices.allow = c 1:9 rwm
43### /dev/pts/*
44lxc.cgroup.devices.allow = c 136:* rwm
a38e3e32 45### fuse
46lxc.cgroup.devices.allow = c 10:229 rwm
6e39e4cb 47
f24a52d5
SG
48# Setup the default mounts
49lxc.mount.auto = cgroup:mixed proc:mixed sys:mixed
a38e3e32 50lxc.mount.entry = /sys/fs/fuse/connections sys/fs/fuse/connections none bind,optional 0 0
f24a52d5 51
6e39e4cb
SG
52# Blacklist some syscalls which are not safe in privileged
53# containers
54lxc.seccomp = @LXCTEMPLATECONFIG@/common.seccomp
4662c6de
SG
55
56# Lastly, include all the configs from @LXCTEMPLATECONFIG@/common.conf.d/
57lxc.include = @LXCTEMPLATECONFIG@/common.conf.d/