1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
.\" $OpenBSD: bgplgsh.8,v 1.11 2015/09/10 15:16:44 schwarze Exp $
.\"
.\" Copyright (c) 2005, 2006 Reyk Floeter <reyk@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: September 10 2015 $
.Dt BGPLGSH 8
.Os
.Sh NAME
.Nm bgplgsh
.Nd looking glass shell for the OpenBSD Border Gateway Protocol daemon
.Sh SYNOPSIS
.Nm bgplgsh
.Sh DESCRIPTION
The
.Nm
program is a looking glass shell for the
.Xr bgpd 8
Border Gateway Protocol daemon.
The looking glass will provide a simple command line interface
with read-only access to a restricted set of
.Xr bgpd 8
and system status information, which is typically used on route
servers by Internet Service Providers (ISPs) and Internet eXchange
points (IXs).
.Pp
It requires three steps to enable the looking glass shell:
.Bl -enum
.It
Add
.Nm
as a valid login shell.
See
.Xr shells 5
for more information.
.Bd -literal -offset indent
# echo /usr/bin/bgplgsh \*(Gt\*(Gt /etc/shells
.Ed
.It
Create a new user for restricted looking glass access.
See
.Xr adduser 8
for more information about system user management.
.Bd -literal -offset indent
# adduser -shell /usr/bin/bgplgsh -batch bgplg
# passwd bgplg
.Ed
.It
Start the Border Gateway Protocol daemon with a second,
restricted, control socket.
See
.Xr bgpd.conf 5
and
.Xr bgplg 8
for more information.
.Pp
For example,
add the following to
.Pa /etc/bgpd.conf
to have
.Xr bgpd 8
open a second, restricted, control socket:
.Pp
.Dl socket \&"/var/www/run/bgpd.rsock\&" restricted
.El
.Sh FILES
.Bl -tag -width "/var/www/run/bgpd.rsockXX" -compact
.It Pa /var/www/run/bgpd.rsock
Position of the second, restricted, control socket of
.Xr bgpd 8 .
.El
.Sh SEE ALSO
.Xr bgpd 8 ,
.Xr bgplg 8
.Sh HISTORY
The
.Nm
program first appeared in
.Ox 4.1 .
The initial implementation was done in 2005 for DE-CIX, the German
commercial internet exchange point.
.Sh AUTHORS
The
.Nm
program was written by
.An Reyk Floeter Aq Mt reyk@openbsd.org .
.Sh CAVEATS
To prevent commands from running endlessly,
.Nm
will kill the corresponding processes after a hard limit of 60 seconds.
For example, this can take effect when using
.Xr traceroute 8
with blackholed or bad routes.
|