# MVS Cerberus
advert:
https://youtu.be/_m4ntY-gONc?si=v1HK_Qvi8YE99HYs
you probably want my SNA-CLAW-3270 too...
https://github.com/jimpames/SNA-CLAW-3270
deep dive of snaw-claw-3270 https://www.youtube.com/@sna-claw-3270
DEMO CHANNEL: https://www.youtube.com/@sna-claw-3270
Source code:
as of today 29 may 2026
the gzip of the installable system for MVS CERBERUS is in the github here - it is 390x code - you must run under zlinux 18.04 390x - see my improvements script in the repo, or get it current with compiler, flask, go , python before you untar
-
don't upg past 18.04 on 390x for zlinux, hyperion doesn't have instr supt.
-
Q: can we recompile your work for another linux?
-
- sure, have a great time.
OR - request DASD image via my email
- this is based on moshix zlinux , modified w python, go and ngrok support
- you can now use my files above to improve moshix zlinux installer for 390x to
- be modernized for GO, FLASK, PYTHON and more but staying on 18.04 for hyperion stability.
Recommended Setup for Users
After extracting the tarball, run these commands:
cd cerberus-dist/cerberus
# 1. Create a clean Python virtual environment
python3 -m venv venv
# 2. Activate it
source venv/bin/activate
# 3. Install required packages
pip install -r requirements.txt
Then continue with:
Bashsudo ./setup.sh
./bringupall.sh
Note for users:
The venv/ folder is not included in the tarball (to keep it small).
You should always create a fresh venv on each new machine.
Works on Ubuntu/Debian, zLinux, and most other Linux distributions with Python 3.11+.
User Account Strategy
Cerberus is designed to run as a dedicated system user called cerberus
(no login shell, for security).
Your normal user account (e.g. zubuntu) is used to run ./setup.sh and ./bringupall.sh.
What setup.sh should do (which it already does):
Create the cerberus user if it doesn't exist
Own all files under /opt/cerberus and /etc/cerberus as cerberus:cerberus
Run the Python processes as cerberus
User Accounts
Cerberus runs as a dedicated non-login system user named cerberus.
Your normal user (e.g. zubuntu) runs the setup and bringup scripts.
The setup.sh script will automatically:
Create the cerberus user if it doesn't exist
Set correct ownership and permissions
You do not need to manually create the user.
Hercules / Hyperion: If you need this build, msg me and I will zip it for you with the config....
Q/A:
will I release the source?: - only as a DASD image - once you boot it, you have source.
you got zlinux ubuntu 18.04 running on zarch 390x? yes - had to build req. hyperion, cfg it and now both host and VM are ubuntu 18.04
thank you to the community for your brilliant work making this possible
https://github.com/racingmars/proxy3270
https://go.dev/
https://www.python.org/
https://github.com/pyradius/pyrad
https://www.jaymoseley.com/hercules/
https://sdl-hercules-390.github.io/html/
https://www.cbttape.org/vm6.htm
https://www.vm370.org/
https://github.com/moshix/zlinux
https://ngrok.com/
https://www.ibm.com/us-en
https://releases.ubuntu.com/18.04/
### 3270 RADIUS Turret Firewall — ephemeral access, audited sessions, zero firewall configuration
> *Most network security products try to keep attackers out.*
> *Cerberus makes the door not exist until the right person knocks.*
> *Hack the net all you want — the tunnel to the admin of the machine is Cerberus only, and down till authed.*
---
## What it does
Cerberus is an authenticated edge gateway for **3270 terminal access** to mainframe systems —
TSO, VM/370, AS/400, SYSTEM/36, anything that speaks the 3270 datastream.
It sits between users and your mainframes. It opens an ephemeral TN3270 path **only after** a user
successfully authenticates. It closes that path the moment the session lease expires.
It produces a complete audit record of every connection it ever brokered.
There is no permanent TN3270 port listening on the public internet. There is no port-forward to configure.
There is no firewall rule to write.
**The endpoint does not exist** until Cerberus summons it for an authorized user, and it ceases to
exist when their lease ends.
A port scan against your reserved endpoint finds nothing. Reconnaissance finds nothing. The mainframe
behind Cerberus is invisible to the network until auth grants visibility,
for the duration of a lease, audited end to end.
This is **just-in-time access** taken to its logical conclusion.
---
## How it works
Authorized User
│
▼
┌──────────────────────────┐ │ Cerberus Auth Page │ persistent HTTPS endpoint │ │ └─────────────┬────────────┘ │ RADIUS · LDAP · SAML · OIDC · PassTicket ▼ ┌──────────────────────────┐ │ Cerberus Gate │ policy · grants · audit └─────────────┬────────────┘ │ grant event ▼ ┌──────────────────────────┐ │ Ephemeral TCP Tunnel │ exists only while leased └─────────────┬────────────┘ │ ▼ ┌──────────────────────────┐ │ Your Mainframes │ TK5 · VM/370 · z/OS · S/36 · AS/400 └──────────────────────────┘
1. User browses to `https://auth.your-domain/` and authenticates.
2. Gate validates against your identity source. If approved, it grants a session.
3. Exposure layer opens a TCP tunnel from a reserved endpoint to the local turret.
4. User points their TN3270 client at the granted endpoint.
5. Turret presents a backend menu, splices the user's session to the chosen mainframe.
6. Lease ticks down. Idle warning. Auto-revoke on expiry. Tunnel closes.
7. Audit log records every step.
---
## Distribution
**For Hercules / Hyperion**: free, open source, this repository. Drop the kit on any zLinux (or any Linux) host, run `./install.sh`, configure secrets, point it at your backends, run.
Suitable for hobby mainframes, labs, training environments, and as a reference implementation.
**For real iron**: a commercial license includes a pre-built **DASD volume** containing a hardened zLinux 18.04 for System/390 with Cerberus, ngrok, Python, and Go pre-installed and pre-configured.
Attach the DASD to your IFL engine. IPL it. Configure your identity source. You have a working 3270 access control plane — in your own LPAR, on hardware you already own,
with zero new operational discipline to learn. Update process is "swap the DASD volume." [Contact for licensing](#commercial-licensing).
---
## Use cases
- **Banks**, **insurers**, **airlines**, **government**: gate operator and sysprog 3270 access with corporate identity (AD/Okta/Ping) and SIEM-grade audit logging,
without changing how mainframe applications authenticate users
- **MSPs**: provide multi-tenant 3270 access to multiple customer mainframes through one gateway with per-customer audit and lease policies
- **Compliance teams**: produce technical evidence aligned to PCI-DSS, SOX, FFIEC, GDPR, FedRAMP, and NIST 800-53 access-control families
- **Hobbyist operators**: stop exposing your TK4-/TK5/VM/370 to the open internet, gate it behind real auth, keep a real audit trail
- **Lab and training environments**: give students time-limited, audited access to instructional mainframes without granting permanent network paths
---
## Quick start (Hercules / lab)
```bash
unzip mvs-cerberus-kit.zip -d ~/mvs-cerberus
cd ~/mvs-cerberus
sudo ./install.sh
# Edit secrets
sudo nano /etc/cerberus/environment
# Register your backends
sudo nano /etc/cerberus/cerberus.ini
# Bring it up
sudo systemctl start cerberus cerberus-https-tunnel
# Browse to your reserved domain and authenticate.
Full installation walkthrough: docs/deployment.md.
Architecture deep-dive: docs/architecture.md.
Security model and threat coverage: docs/security-model.md.
Watch the 18-minute end-to-end walkthrough
Includes: install, configuration, first auth, granted endpoint, TN3270 client connecting through the tunnel to a TK5 backend, lease expiry, audit log.
| Path | What |
|---|---|
cerberus/ |
Python package — gate, exposure, RADIUS, auth, turret, web |
cmd/cerberus-tunnel/ |
Go binary — ngrok-backed ephemeral TCP tunnel manager |
etc/cerberus/ |
Configuration templates (cerberus.ini, environment, ngrok.yml) |
etc/systemd/system/ |
Systemd units for service management |
scripts/ |
Operational scripts (bringupall.sh, cerberus-tunnels.sh, freeze-dasd.sh) |
static/ |
Auth-page assets (CSS, the amber-CRT background artwork) |
docs/ |
Architecture, deployment, configuration, security model, troubleshooting |
install.sh |
One-shot installer for any Linux host |
Current release in this repo: v1 source.
v2 source lands here on 18 May 2026 with:
- Refined gate policy engine
- Multi-backend menu in the turret
- SAML 2.0 and OIDC auth backends
- HA pair support
- SIEM integration helpers (Splunk, QRadar, generic CEF)
- The updated amber-CRT auth-page artwork
If you cloned v1 in the last 12 hours, thanks for showing up early. Watch this space.
Existing tools for 3270 access control fall into three groups:
- Mainframe-side identity products (RACF/ACF2/Top Secret, PassTicket, IBM MFA): excellent at what happens once you're on the mainframe,
- weaker at network-layer access in the first place.
- Generic ZTNA brokers (Boundary, Teleport, Tailscale): designed for SSH and HTTPS, with little awareness of 3270 / TN3270 / EBCDIC / SNA semantics,
- and they require the backend to be continuously reachable through them.
- Bastion-host + jump-server patterns: operational toil, partial audit coverage, no native concept of "the door doesn't exist when nobody's authorized."
Cerberus fills the gap between them. Mainframe-native distribution (DASD volume on zLinux). Network-edge enforcement (ephemeral tunnel, not continuous exposure). Identity-source-agnostic (your AD/Okta/SAML and your RACF). Full audit trail. Drops into the operational model real mainframe shops already use.
The architecture isn't theoretical. Cerberus runs every day on a hobby z-Architecture stack: Win 11 → VMware Workstation Pro → zLinux for s390x → Hercules/Hyperion → MVS 3.8j TK5 and VM/370 Community Edition as parallel backends, with Cerberus gating both. The demo video shows it end to end.
The community edition is free under the MIT-style license in LICENSE-COMMUNITY. It is fully functional, fully documented, and the source for the commercial edition.
Commercial licensing for shops running real System z hardware includes:
- Pre-built zLinux DASD volume with everything configured and tested
- Defined support tiers (business-hours, 24×5, 24×7)
- Help with AD/LDAP/SAML/OIDC integration
- HA pair design and deployment assistance
- SIEM integration (Splunk, QRadar, ArcSight)
- Custom protocol surfaces (roadmap: SSH, HTTPS, RDP, VNC)
- Quarterly product reviews and roadmap input
Contact: jimpames@gmail.com
Tier pricing and a comparison matrix are in docs/commercial-tiers.md.
- The endpoint really doesn't exist until you authenticate. We mean it. Try scanning the reserved address while no session is active. Nothing answers.
- Cerberus complements RACF/ACF2/Top Secret — it does not replace them. RACF authenticates users to z/OS; Cerberus authenticates users to the network path to z/OS. Defense in depth.
- We accept pull requests, bug reports, and pointed questions. We do not accept "this should be a SaaS" suggestions. It is intentionally not a SaaS. The customer keeps the data, the keys, the audit log, and the off switch.
MVS Cerberus © 2026 jimpames. System z, z/OS, z/VM, RACF, ACF2, AS/400, and SYSTEM/36 are trademarks of International Business Machines Corporation. Hercules and Hyperion are projects of their respective communities. ngrok is a product of ngrok Inc. This project is not affiliated with or endorsed by any of the foregoing.