-
Notifications
You must be signed in to change notification settings - Fork 2
public looking glass
Pre-Alpha. This page describes behavior that may change. Not for production use.
Stand up a public Looking Glass for your AS. The goal is that your peers, your customers, and the general public can query your route table, see your peer state, and read your AS path topology graph, without logging in and without being able to mutate anything.
The Looking Glass is a separate HTTP server inside Ze. It runs on its own port, with no authentication, and exposes both an HTMX web UI and a Birdwatcher-compatible JSON API that Alice-LG can consume.
system {
host lg-01;
domain as30740.net;
}
environment {
looking-glass {
enabled true;
server main {
ip 0.0.0.0;
port 8443;
}
tls true;
}
}
That is the whole configuration surface. The Looking Glass reads from the same BGP state as the rest of the daemon, so it shows whatever your peers have told you, exactly as your BGP RIB sees it.
For TLS, Ze generates an ECDSA P-256 self-signed certificate on first start if none is configured. For a public deployment, you want a real certificate. Drop it into the blob store or terminate TLS in front of Ze with a reverse proxy (nginx, Caddy, haproxy) that proxies /lg/ and /api/looking-glass/.
The Looking Glass listens on the IP and port you configure. To expose it publicly, either:
- Bind directly to a public interface (
ip 0.0.0.0plus a firewall rule opening the port). - Bind to
127.0.0.1and put a reverse proxy in front.
Option 2 is what most deployments pick because it lets you terminate TLS, add rate limiting, and put the Looking Glass on port 443 alongside other web services.
server {
listen 443 ssl http2;
server_name lg.as30740.net;
ssl_certificate /etc/letsencrypt/live/lg.as30740.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/lg.as30740.net/privkey.pem;
location /lg/ {
proxy_pass http://127.0.0.1:8443;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto https;
}
location /api/looking-glass/ {
proxy_pass http://127.0.0.1:8443;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto https;
}
location = / {
return 302 /lg/peers;
}
}The web UI lives at /lg/. Three tabs:
-
/lg/peers: every peer with state, ASN name from Team Cymru, and route counts. -
/lg/lookup: prefix or IP lookup with the AS path topology graph rendered inline. -
/lg/search: unified search by prefix, AS path pattern, or community.
The Birdwatcher API lives at /api/looking-glass/. Test it with curl:
curl -s https://lg.as30740.net/api/looking-glass/status
curl -s https://lg.as30740.net/api/looking-glass/protocols/bgp
curl -s 'https://lg.as30740.net/api/looking-glass/routes/search?prefix=8.8.8.8'The API returns snake_case field names (Birdwatcher convention), not Ze's usual kebab-case.
Point Alice-LG at the Birdwatcher API and you get a turn-key multi-router Looking Glass.
sources:
- name: "AS30740 Edge"
type: birdwatcher
birdwatcher:
api: "https://lg.as30740.net/api/looking-glass"Alice-LG handles the user-facing UI; Ze handles the data.
A few things are worth not publishing.
Do not expose the SSH CLI publicly. That is the read-write, authenticated control plane. Put it behind a jump host or a VPN. The Looking Glass exists precisely so you do not need to.
Do not expose the authenticated web UI on the same port. The authenticated web UI is a different HTTP server inside Ze, on a different port. Make sure the reverse proxy only exposes /lg/ and /api/looking-glass/, not /config/ or /admin/.
Be careful about what your communities reveal. The Looking Glass shows the communities on every route. If you use communities for internal signalling (geographic tagging, customer identity, traffic engineering), that information is visible to anyone who looks. Most operators accept this because the communities are usually public anyway.
Certificate mismatch. Using the self-signed cert in production breaks browser trust. Use a real certificate from the start.
SSE flood. Every open /lg/peers tab opens an SSE connection for live updates. The server caps at 100 concurrent SSE clients. If you expect more, either scale out behind a load balancer or disable the SSE feature in the reverse proxy.
ASN name decorator. The Team Cymru decorator queries DNS on every peer. If your DNS resolver is slow or the cache is cold, page loads are slow. Tune environment { dns { cache-size cache-ttl } } if this hurts.
Rate limiting. The Looking Glass does not rate-limit itself. A reverse proxy with limit_req or similar is the right place to protect it against abuse. Prefix lookups are relatively cheap; AS path graph rendering is more expensive.
- Looking Glass reference for the full interface reference.
-
System configuration for the
looking-glassblock. - In-tree Looking Glass guide.
Unreviewed draft. This wiki was authored in bulk and has not been reviewed. File corrections on the issue tracker.
- Overview
- YANG Model
- Editor Workflow
- Archive and Rollback
- System
- Interfaces
- VRRP
- BFD
- FIB
- OSPF
- IS-IS
- MPLS / LDP / RSVP-TE
- RSVP-TE
- SRv6
- Static Routes
- Policy Routing
- Firewall
- Traffic Control
- Class of Service
- L2TP/PPP
- PPPoE
- VPP Data Plane
- RPKI
- IPsec VPN
- TACACS+ AAA
- RADIUS AAA
- AS112 DNS
- Authorization
- Fleet
- BGP
- Starting and Stopping
- Show Commands
- Monitoring
- Flow Export
- DDoS Mitigation
- Anomaly Detection
- Health Checks
- Audit Trail
- Production Diagnostics
- Logging
- Operational Reports
- Healthcheck
- Self-Update
- Zero-Touch Provisioning
- MRT Analysis
- Upgrade and Restart
- Storage
- Policy
- Core
- Resilience
- Validation
- Capabilities
- Address Families
- Protocol
- Subsystems
- Infrastructure
- Route Server at an IXP
- Transit Edge with RPKI
- Public Looking Glass
- ExaBGP Migration Walkthrough
- FlowSpec Injection
- Chaos-Tested Peering
- AS Path Topology