BGPLGD(8)
β¨ bgplgd(8) β¨
okay bestie, welcome to the system manager's manual for bgplgd π
NAME
bgplgd β it's a FastCGI server for bgpctl. that's the whole vibe. π¦
SYNOPSIS
bgplgd [-d] [-p path] [-S socket] [-s socket] [-U user] [-V]
DESCRIPTION
so bgplgd is a server that implements the FastCGI Protocol so it can run bgpctl(8) commands for you π
it's a simple server, and it implements a simple web API to query bgpd(8). no cap.
here's the glow-up sequence: bgplgd opens a socket at /run/bgplgd.sock, owned by www-data, with permissions 0660. then it drops privileges to user "_bgplgd", calls unveil(2) on the bgpctl(8) binary, and restricts itself with pledge(2). self-care, but make it security πβ¨
the options are as follows:
-dβ do NOT daemonize, bestie. if you pass this,bgplgdruns in the foreground and logs to stderr. main character energy, staying right there where you can see it π-ppathβ usepathinstead ofbgpctl(8)to querybgpd(8). swap the tool, keep the vibes.-Ssocketβ usesocketinstead of the default/run/openbgpd/bgpd.rsockto talk tobgpd(8). different socket, same energy π-ssocketβ create and bind to an alternative local socket atsocket. your socket, your rules π-Uuserβ change the owner of/run/bgplgd.socktouserand its primary group, instead of the defaultwww-data. glow-up the ownership fr fr π-Vβ show the version and exit. short, sweet, iconic.
πΈ the API endpoints πΈ
bgplgd provides the following API endpoints. unless it says otherwise, the endpoints don't take any parameters. simple like that β¨
/interfacesβ show the interface states./memoryβ show RIB memory statistics./metricsβ output various statistics in OpenMetrics format./neighborsβ show detailed neighbors information. you can limit the output with these parameters:neighbor=peerβ show information for a specific neighbor.peercan be the neighbor's address or description.group=nameβ show only entries from the specified peer group.
/nexthopsβ show the list of BGP nexthops and the result of their validity check./rib/rib/in/rib/outβ show routes from thebgpd(8)Routing Information Base. for/rib/inthe Adj-RIB-In gets queried, and for/rib/outit's the Adj-RIB-out. you can filter the output with these parameters:neighbor=peerβ show information for a specific neighbor.peercan be the neighbor's address or description.group=nameβ show only entries from the specified peer group.as=numberβ show only entries with the specified source AS number.community=stringext-community=stringlarge-community=stringβ show only entries that match the specified community.af=(ipv4 | ipv6 | vpnv4 | vpnv6)β show only entries that match the specified address family.rib=nameβ show only entries from the RIB with namename. can only be used with the/ribendpoint. iykyk.ovs=(valid | not-found | invalid)β show only prefixes that match the specified Origin Validation State.avs=(valid | invalid | unknown)β show only prefixes that match the specified ASPA Validation State.best=1β show only selected routes.error=1β show only prefixes which are marked invalid and were treated as withdrawn.filtered=1β show only prefixes which are marked filtered by the input filter.invalid=1β show only prefixes which are not eligible.leaked=1β show only prefixes where a route leak was detected. πprefix=addrβ show only entries that matchprefix, either as the best matching route or show the entry for this CIDR prefix.all=1β show all entries in the specified prefix range.or-shorter=1β show all entries covering and including the specified prefix.
/rtrβ show a list of all RTR sessions./setsβ show a list summarizing allroa-set,as-set,prefix-set, andorigin-settables./summaryβ show a list of all neighbors, including info about the session state and message counters.
EXAMPLES
bestie, drop this into /etc/bgpd.conf so bgpd(8) opens a second, restricted, control socket:
socket "/run/openbgpd/bgpd.rsock" restricted
and here's an example setup in httpd(8):
location "/bgplgd/*" {
fastcgi socket "/run/bgplgd.sock"
request strip 1
}
SEE ALSO
HISTORY
the bgplgd server first appeared in OpenBSD 7.2. a legend was born π
AUTHORS
Claudio Jeker <claudio@openbsd.org> π«Ά
okay that's the whole page, you ate that π go forth and query your BGP fr fr
this was the Debian build, dated July 13, 2025 β mwah, love u, bye β¨π
π¦ where this page comes from
- ubuntu resolute: openbgpd 9.0-1 Β· ISC
- ubuntu stonking: openbgpd 9.2-1 Β· ISC
- Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms