bgpmon-filter - Critical Prefix Filter
This script can connect to a BGPmon instance and filter messages that match given critical prefixes. These messages can then be sent to other clients that connect to this instance, can be saved to a file, or printed to standard out.
This script allows one to specify a set of configuration parameters and a list of desired critical prefixes or autonomous system numbers. This script will then connect to the specified instance of BGPmon and filter the messages it receives. If a given message has data for one of our given prefixes or any address within that prefix, it will pass it along to other cliences connected to it, print it to standard out, or save it to a file. These are options the user may set before running an instance.
Users may create a configuration file for easy command-line use. Below is an example of a full configuration file:
config_file = /home/user/bgpmon-filter.confg output_file = /tmp/bgpmon-filter-output.txt prefix_file = /home/user/bgpmon-filter-prefixes.conf log_file = /tmp/bgpmon-filter-log.log log_level = 7 server = bgpmon2.netsec.colostate.edu port = 50001 listening_port= 60000 stdout = 1
This configuration will connect to a BGPmon instance at bgpmon2.netsec.colostate.edu:50000 and will listen for connections on 60000. It will look for a list of critical prefixes to filter in file /home/user/bgpmon-filter-prefixes.conf. All messages that match the prefixes will be printed to standard out and will be saved in file /tmp/bgpmon-filter-output.txt. Note that if you have a configuration file already and want to change variables for a run, you may do so using command line arguments. They will override any variables set from the configuration file. You may see a list of all options by running ./bgpmon-filter -h.
The following is an example of the critical prefix configuration file:
ipv4 18.104.22.168/24 ms ipv4 10.10.0.0/16 ls as 1733 ipv6 2a02:1378::/32 ls ipv6 1020:9a52::/32 ms ipv4 192.168.1.135
You may have multiple prefixes of all kinds and don't have to be in any order within the file. For mor information on this file configuration, please see the perldoc for BGPmon::Filter.pm.
M. Lawrence Weikum, "email@example.com"
Please report any bugs or feature requests to "firstname.lastname@example.org".
You may find documentation help for this script with the perldoc command.
Copyright (c) 2012 Colorado State University
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.