Skip to content

Network

Tobias Vorwachs edited this page Nov 23, 2026 · 2 revisions

Network

A sandbox reaches only what you allow, and every attempt is logged.

Network tab: rules and port forwards

Modes

Mode Behaviour
whitelist (default) Only allowed destinations are reachable.
blacklist Everything public is reachable except denied destinations.
boxquell mode mybox blacklist
boxquell policy mybox            # show the rules of a sandbox

Private and local addresses (your LAN, the host itself) stay closed in both modes until a rule names them.

Rules

boxquell allow mybox example.com            # one name
boxquell allow mybox '*.example.com:443'    # subdomains, one port
boxquell allow mybox 192.168.1.20:5432      # an address in your network
boxquell deny  mybox 10.0.0.0/8             # a whole network
boxquell unrule mybox "allow example.com"   # remove a rule
Form Example
Name example.com
Wildcard *.example.com
Name and port *.example.com:443
IP address 192.0.2.7
Address and port 192.168.1.20:5432
Network 10.0.0.0/8

The first matching rule wins, and address rules are checked before name rules.

In whitelist mode a connection must go to an address that an allowed name resolved to, and the name a client presents (TLS SNI, HTTP Host) must match. An allowed address cannot be used to reach a different site. DNS is answered by the daemon: names that are not allowed do not resolve.

Note

Git over SSH needs the port allowed: boxquell allow mybox github.com:22.

Rules that end by themselves

boxquell allow mybox registry.npmjs.org --for 2h     # 30m, 2h, 1d
boxquell read  mybox docs.example.com --for 1d

--for ends the rule after that long. The rule form in the app has a choice of duration, and the notifications offer "for 1 hour" next to Allow.

Read-only rules

boxquell read mybox docs.example.com

A read-only rule lets web requests that fetch through (GET, HEAD and OPTIONS) and refuses those that send or change something (POST and the like).

  • It works for websites. For HTTPS, Boxquell looks into the requests and answers with a certificate of the sandbox's own authority. The sandbox trusts it.
  • Other kinds of connection to a read-only destination are refused, because they cannot be checked.

Data limits

boxquell set mybox --upload-limit 200 --download-limit 2000    # MiB per run; 0 for no limit

When the sandbox has sent or received that much to or from destinations outside, its network is cut off until you let it continue. The interface offers to let it continue. Data limits count what passes to and from destinations outside, not the terminal or the project folder.

Speed limits

boxquell set mybox --download-speed 2000 --upload-speed 500    # kbit per second; 0 for no limit

The limits apply at once, also to open connections. They are also under Network in the app.

Traffic statistics

The Network tab of a sandbox shows what it sent and received per hour or day, and the destinations that carried most of it.

What opens by itself

What installed software and the system's package manager need is open by itself. It is shown under Network, and you can switch each destination off. Before an install, a sheet lists what comes along and which destinations it opens.

Note

If you switch off a destination that installed software needs, that software may stop working. The log shows what was refused (boxquell logs mybox --blocked).

Global rules

Denies no sandbox can undo, and allows every sandbox gets.

boxquell global allow example.com
boxquell global deny tracker.example
boxquell global unrule "deny example.com"
boxquell global ls

Emergency stop

boxquell lockdown on     # every sandbox loses the network at once; open connections stop carrying data
boxquell lockdown off
boxquell lockdown        # show the state

The web UI has the same switch in its sidebar, and the tray icon has an emergency stop. A lockdown survives a restart of the daemon.

Log

boxquell logs mybox               # last 50 entries
boxquell logs mybox -f --blocked  # follow, blocked attempts only
boxquell logs -n 200              # all sandboxes, 200 lines

Each DNS lookup and connection attempt is recorded with destination, verdict, rule, bytes and duration. A connection attempt cannot be hidden from the log.

The network log with filters

Allowed connections in the log have a Block button, to block that destination from there.

Notifications

When a connection is blocked you get a desktop notification and a message in the UI with a button to allow the destination. Each destination is announced at most once a minute; every attempt is in the log either way. The Notifications page lists blocked connections to allow, ignore or dismiss.

Blocked connections to allow or ignore

Switch the two messages off:

boxquell config notify-blocked off
boxquell config toast-blocked off

Boxquell also warns when an installed agent has no credential.

Limits

The guest is IPv4-only, and UDP other than DNS is refused, so there is no QUIC; clients fall back to TCP. A gateway on your own computer (localhost) is reachable from the sandbox as 10.0.2.2.

Next: Usage and Costs | Secrets | Security Model | Command Reference

Clone this wiki locally