A looking
glass is a service that gathers routing information from your routers and
thus gives you a central point to examine your sight of the Internet. Looking
glasses are commonly used by ISPs and Internet exchange
points and sometimes made publicly available to help others to solve
routing issues. This howto focuses on BGP as it's
the routing protocol amongst the various networks and autonomous
systems that form the Internet.
A recent version of OpenBSD comes with
OpenBGPD, an Apache webserver, and a
CGI script called bgplg. These are
the building blocks of our looking glass server.
# enable ntpd ntpd_flags= # disable audio server sndiod_flags=NO # disable inetd inetd_flags=NO # enable httpd httpd_flags= # enable openbgpd bgpd_flags=
AS 65511 fib-update no listen on 0.0.0.0 route-collector yes router-id 192.168.0.25 socket "/var/www/logs/bgpd.rsock" restricted neighbor 192.168.0.24 { remote-as 65511 descr "Juniper MX80" announce none }
# chmod 0555 /var/www/cgi-bin/bgplg # chmod 0555 /var/www/bin/bgpctl
# cp /etc/resolv.conf /var/www/etc/
# /etc/rc.d/httpd start # /etc/rc.d/bgpd start
protocols { bgp { local-as 65511; group lookingglass { type internal; import reject; export accept; neighbor 192.168.0.25; } } } policy-options { policy-statement reject { then reject; } policy-statement accept { then accept; } }