in ,

A Unikernel Firewall for QubesOS, Hacker News

QubesOS provides a desktop operating system made up of multiple virtual machines, running under Xen. To protect against buggy network drivers, the physical network hardware is accessed only by a dedicated (and untrusted) “NetVM”, which is connected to the rest of the system via a separate (trusted) “FirewallVM”. This firewall VM runs Linux, processing network traffic with code written in C.

In this blog post, I replace the Linux firewall VM with a MirageOS unikernel . The resulting VM uses safe (bounds-checked, type-checked) OCaml code to process network traffic, Uses less than a tenth of the memory of the default FirewallVM, boots several times faster, and should be much simpler to audit or extend.

Table of Contents

    Qubes

Another Fedora VM (“dom0”) runs the window manager and drives most of the physical hardware (mouse, keyboard, screen, disks, etc).

Networking is a particularly dangerous activity, since attacks can come from anywhere in the world and handling network hardware and traffic is complex. Qubes therefore uses two extra VMs for networking:

Both NetVM and FirewallVM perform

NAT , so packets from “comms” appear to NetVM to have been sent by the firewall, and packets from the firewall appear to my house router to have come from NetVM.

Each of the AppVMs is configured to use the firewall ( (2.1) as its DNS resolver. FirewallVM uses an iptables rule to forward DNS traffic to its resolver, which is NetVM.

Problems with FirewallVM

After using Qubes for a while, there are a number of things about the default FirewallVM that I’m unhappy about:

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *

GIPHY App Key not set. Please check settings

i3 v4.18 Released, Hacker News

Fight or flight: How horror movies manipulate our brains for peak excitement, Ars Technica

Fight or flight: How horror movies manipulate our brains for peak excitement, Ars Technica