Network cables plugged into rows of switch ports

Varsh

Varsh is a small, self-contained console for a Linux laptop that you use as an internet gateway for your other devices. It shows who is using the gateway and lets you control them.

All products
Varsh console overview: live download and upload throughput across six devices
Varsh devices list on a phone, with approve, block and pause controls

How it works

Varsh turns a Linux laptop into a managed internet gateway. Your other devices join the same Wi-Fi and use the laptop as their gateway. The laptop forwards their traffic, and Varsh decides who gets through, how fast and how much.

It works inside the kernel’s own firewall. Varsh keeps a single nftables table that records which devices actually send traffic through the laptop, counts every byte per device, and applies blocks, schedules and speed limits right where packets are forwarded. A small daemon reads those counters every three seconds and keeps hourly usage in SQLite.

Everything runs locally with no dependencies: the Python standard library, nftables and ip. Nothing is downloaded and nothing loads from a CDN, so the console keeps working even when the connection upstream does not.

Where Varsh sits

Your devices

  • Phone
  • Laptop
  • Tablet
  • Anything with Wi-Fi

Gateway set to the laptop’s IP

Varsh gateway · Linux laptop

nftables · table inet varsh

  1. Allowlist of approved devices
  2. Byte counters per device
  3. Blocks, schedules, limits, quotas

Daemon

Reads counters every 3 s · hourly usage in SQLite

Console

HTTPS on port 8787 · varsh command line

Upstream

Router

Out to

Internet

Varsh runs on an ordinary Linux laptop. Point a device's gateway at it and its traffic passes through Varsh on the way to the router.

In and out on the same Wi-Fi

Varsh is not a second router with its own network. Your devices, the laptop and the router all share one Wi-Fi network, and each packet bends through the laptop like a hairpin.

The hairpin path of one packetA packet goes from a phone over the Wi-Fi into the Varsh laptop, is checked there, then leaves over the same Wi-Fi to the router. Replies return the same way. The direct route from phone to router is never offered.No shortcut: ICMP redirects offOne Wi-Fi network, one subnetYour phonegateway = laptopVarshchecks + countsRoutersees only the laptop123
Request Reply
  1. In over Wi-Fi

    Your phone's gateway is set to the laptop, so every packet goes to the laptop first.

  2. Checked and counted

    Varsh's nftables rules decide whether it may pass (approval, blocks, schedules, limits and quotas) and count its bytes.

  3. Out over the same Wi-Fi

    The laptop sends it back out of the same Wi-Fi interface to the router, with NAT. The router sees only the laptop, so replies come back through Varsh too.

Why ICMP redirects are off

A normal Linux gateway notices that your phone and the router share a network and tells the phone to go straight to the router. A phone that listens skips the laptop: no counting, no blocking. Varsh switches those redirects off, and its health page flags it if they come back.

The cost of the hairpin

Every packet crosses the Wi-Fi twice, in and out, so the laptop's Wi-Fi link sets the ceiling. Devices on the wired LAN cross it only once.

What Varsh does best

See the whole network, live

The overview shows live download and upload across every device for the last ten minutes, with how many devices are online, pending or blocked, and how much data has been used today and this month.

  • Live throughput chart
  • Online, pending and blocked counts
  • Today’s and this month’s usage
Varsh console overview: live download and upload throughput across six devices

Every device, named and in reach

Each device shows its name, vendor, IP and MAC, live speed and today’s usage. Approve, block or pause it in one tap, or select several and change them together.

  • Search, sort and filter by status
  • Vendor names and device types
  • Merge a phone that came back with a new private MAC
Varsh devices list on a phone, with approve, block and pause controls

Limits that feel smooth

Give any device its own download and upload limits, plus daily and monthly quotas that either cut it off or slow it down when used up. Traffic over a limit is queued rather than dropped, so calls and video stay steady: in testing, a 2 Mbps limit gave about 1.9 Mbps.

  • Per-device, per-group and gateway-wide defaults
  • Daily and monthly quotas
  • Block or slow down when a quota runs out
Varsh device page: download and upload limits set to 20 and 5 Mbps

Nothing new gets on without you

With approval mode on, only devices you have approved can forward. Everything new waits as pending. The firewall enforces it as an allowlist, so it fails closed: a device Varsh has not approved cannot get through, whatever happens.

  • Allowlist enforced in the firewall
  • Schedules that switch the internet off for everyone
  • A flood of new devices raises one alert, not thousands of rows
Varsh access settings: approval mode and a schedule for all devices

Know where the data went

Usage is kept by the hour for every device. See the last 24 hours, 7 days, 30 days or 12 months, for the whole network or a single device, with the top users ranked.

Varsh usage page: data used per hour over the last 24 hours, split into download and upload

Every change on the record

New devices, blocks, quota hits and health problems are all logged as alerts, warnings or info, each tied to the device it concerns.

Varsh events: an alert for every new device, with its MAC, IP and vendor

Everything in Varsh

  • Kill switch and pause all

    Cut the internet for every device until you turn it back on, or pause it for a set time and let it return by itself.

  • A status page for every device

    Any device can open a page that shows its own status, speed and usage against its quotas. No login, and each device sees only its own data.

  • Groups and defaults

    Limits and quotas for every device with a tag, falling back to gateway-wide defaults.

  • Schedules

    Per-device schedules, plus windows that switch the internet off for all devices.

  • Wired LAN

    Plug a switch into the laptop’s Ethernet port and share the connection with everything on it.

  • VPN for chosen devices

    Send some devices, or all of them, through a WireGuard tunnel while the laptop itself stays on the normal connection.

  • Nightly backups

    The database is copied every night and the last seven copies are kept.

  • Command line

    Everything the console does, from the varsh command.

  • Secure console

    HTTPS by default, hashed passwords, CSRF protection, login throttling and a strict content security policy.

  • Least privilege

    The daemon runs as its own unprivileged user with only the network capabilities it needs.

Python standard library, nftables and ip only. No pip dependencies, nothing from a CDN: it keeps working when the uplink does not.

A Raspberry Pi sitting on a small network switch, cables plugged in

Rockfort Labs

Rockfort Labs is an experimental lab. We try ideas quickly, ship the ones that work and keep improving them in the hands of real users. Varsh is one of those experiments. An experiment in how little a useful network tool needs: one daemon, one SQLite file and the kernel’s own firewall.