Enhancing X11 Application Security with LXC
Wouldn't it be nice to add an extra layer of security to a web browser or an Electron-based IM application? After all, if a browser is compromised, the userβs entire home directory may be at risk.
Letβs mitigate this by using LXC to isolate the application from the host system.
The system used in this example is Arch Linux, but the procedure should be easily adaptable to other distributions.
First, we need to install and preconfigure LXC. Install the following packages:
Next, we need to give our LXC containers networking capabilities. To do that, edit the /etc/default/lxc file and append the following line to the bottom:
Now we can start the LXC bridge interface. Enable and start the corresponding systemd unit: