Skip to content

sanderboele/Automated-cloud-bypass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This program was written by Sander Boele (sanderb@ NO SPAM sara.nl) for the GEANT3 project, task 2
It captures traffic from an interface and counts bytes to certain networks that are defined in settings.rb.
It has been tested with a port mirror on a switch to a free interface on a computer.
To create a settings.rb file, copy the file from settings_example.rb and fill in your settings.
If the thresholds in settings.rb are met, the script sets up a lightpath or dynamic circuit to a predetermined destination.
Run it as root for the interface to go into promiscuous mode and the script to work
The easiest way to use it, is in a GNU Screen. The script logs in /var/log/messages.

In order to avoid the log to be filled up with messages like these:
Mar 25 21:52:58 stampertje kernel: [3914962.179734] device eth1 left promiscuous mode
Mar 25 21:52:59 stampertje kernel: [3914963.020017] device eth1 entered promiscuous mode

You can put the device in parmanent promiscuous mode with 

ifconfig et1 promisc

This program requires a ruby interpreter and some other stuff:

ruby 1.8.7
sqlite3-devel


ruby gems: 
  activerecord
  hpricot 
  ipaddr
  pcap
  sqlite3
  

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, either version 3 of the License, or
(at your option) any later version.

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/>.

About

Ruby script that counts bytes and sets up dynamic circuits.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages