bgplg
looking glass for the
OpenBSD
Border Gateway Protocol daemon
SYNOPSIS
bgplg
DESCRIPTION
The
bgplg
CGI program is a looking glass for the
bgpd(8)
Border Gateway Protocol daemon.
The looking glass will provide a simple web interface with read-only
access to a restricted set of
bgpd(8)
and system status information, which is typically used on route
servers by Internet Service Providers (ISPs) and Internet eXchange
points (IXs).
It is intended to be used in a
chroot(2)
environment in
/var/www.
bgplg
is disabled by default.
It requires four steps to enable the looking glass:
Update the file permission mode to allow the execution of the
bgplg
CGI program and the additional statically linked programs that have
been installed into the
chroot(2)
environment.
See the
section below for the list of installed programs.
For example,
to allow execution of
bgplg
and the statically-linked version of
bgpctl(8)
(disabled commands like
ping(8)
and
traceroute(8)
will be hidden from looking glass command list):
Start the Border Gateway Protocol daemon with a second,
restricted, control socket that can be used
from within the
chroot(2)
environment.
See
bgpd(8)
for more information.
For example,
set the following in
/etc/rc.conf.local
to start
bgpd(8)
using the second, restricted, control socket:
bgpd_flags=\&"-r /var/www/logs/bgpd.rsock\&"
Start the Apache Hypertext Transfer Protocol Server.
See
httpd(8)
for more information.
FILES
/var/www/conf/bgplg.css
Optional
bgplg
CSS style sheet.
/var/www/conf/bgplg.head
Optional
bgplg
HTML header.
/var/www/conf/bgplg.foot
Optional
bgplg
HTML footer.
/var/www/logs/bgpd.rsock
Position of the second, restricted, control socket of
bgpd(8).
The following statically linked executables have been installed into
the
chroot(2)
environment of the
httpd(8)
server.
To enable the corresponding functionality, use the
chmod(1)
utility to manually set the file permission mode to 0555 or anything
appropriate.
The
bgplg
program first appeared in
OpenBSD 4.1.
The initial implementation was done in 2005 for DE-CIX, the German
commercial internet exchange point.
AUTHORS
The
bgplg
program was written by
Reyk Floeter reyk@vantronix.net.
CAVEATS
To prevent commands from running endlessly,
bgplg
will kill the corresponding processes after a hard limit of 60 seconds.
For example, this can take effect when using
traceroute(8)
with blackholed or bad routes.