-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
69 lines (69 loc) · 2.61 KB
/
README
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
# Copyright 2011 Merijntje Tak
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
#
# tracestore.pl - Store traceroutes based on NetFlow data
#
# This scripts processes a flowd database file, gets a list of all hosts
# contacted, does a traceroute to them and stores the result in a database.
# This data can later be analyzed to, for example, map your ISP's AS
# paths.
#
# Usage:
# 1. Start flowd and let it collect flows (see flowd man page)
# 1. Configure the variables in the script
# 2. Run the script
#
# Dependencies:
# - Perl module DBD::mysql
# - Perl module Net::Traceroute
# - flowd (tested with version 0.9.1, www.mindrot.org/projects/flowd/)
#
# Database:
# The script is designed to use a MySQL database backend. An example table
# structure is provided in the mysql-tracestore.sql file. The file can be
# loaded like this:
# 1. Login to MySQL
# $ mysql -u root -p
# 2. Create a database
# mysql> create database tracestore;
# 3. Create a new user
# mysql> grant all on tracestore.* to 'username'@'localhost' identified by 'password';
# 4. Load the table structures
# $ mysql -u username -p tracestore < mysql-tracestore.sql
#
# Variables used in the script:
# mysqlHost - Database server hostname
# mysqlUser - Database username
# mysqlPass - Database password
# mysqlName - Database name
#
# flowdFile - flowd database file to be used by the flowd-reader process
#
# flowdSudo - Boolean to indicate whether sudo should be used to run the flowd-reader
#
# flowdBin - Path to flowd-reader binary
#
# sudoBin - Path to sudo binary
#
# processTime - Number of seconds the script has to look back in the flowd database
# for flows to trace. If you put the script in cron, and let it run every
# 5 minutes, set this variable to 300.
#
#
# debugSwitch - turn on for debugging
#
# debugSwitchThreads - turn on for thread debugging
#