The story
- 01 · Problem
Staff in several offices need to work through internet lines located elsewhere, controlled and audited, without software on office PCs and without exposing routers to the internet. First solved by hand in 2019 for a company with offices in several countries.
- What had to change
- Every router must connect outbound (works behind NAT); one line = one tunnel; the line router must know nothing about users; when a line drops, traffic must stop, never leak.
- 02 · System
A central system every office router connects to on its own, pre-configured before shipping; each person uses the line assigned to them; every connection recorded and monitored.
- Connected
- Office routers managed remotely over an encrypted channel; a geolocation service to verify each line.
- Automated
- Line status from three independent checks; passive throughput; six connection methods measured before recommending one.
- 03 · Implementation
Portal (roles, lines, offices, devices, sessions, audit, live updates), agent, monitor, a proxy per line, generated router configurations with rollback, an end-to-end test in a network namespace.
- 04 · Result
In production. New lines are added without touching office equipment.
Technical detail
- Architecture in detail
- Central WireGuard hub; MikroTik routers that connect from behind any modem; policy routing per session; a restricted agent that keeps the live system in line with the database; an address plan so a new line needs no new decisions.
- Layers
- Business Architecture Software Network Infrastructure Security
- Stack
- WireGuard MikroTik RouterOS nftables Python PostgreSQL