summaryrefslogtreecommitdiff
path: root/db/migrate/20130203165800_add_perimeter_parameters.rb
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-02-03 18:30:15 +0100
committerspag <spag@golwen.net>2013-02-03 18:30:15 +0100
commit775dc19b31c8d9304c571187464f936f4f337064 (patch)
treebd7262cd62ee6c2d1d7dce9ca11551338df0085a /db/migrate/20130203165800_add_perimeter_parameters.rb
parentb7368f4471cb4be3ea81f1ade5962e039ce4ef9f (diff)
perimeter parameters added
Diffstat (limited to 'db/migrate/20130203165800_add_perimeter_parameters.rb')
-rw-r--r--db/migrate/20130203165800_add_perimeter_parameters.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/db/migrate/20130203165800_add_perimeter_parameters.rb b/db/migrate/20130203165800_add_perimeter_parameters.rb
new file mode 100644
index 0000000..9ef41d0
--- /dev/null
+++ b/db/migrate/20130203165800_add_perimeter_parameters.rb
@@ -0,0 +1,23 @@
+class AddPerimeterParameters < ActiveRecord::Migration
+ def up
+ GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'contact_count_threshold', :value => '10', :class_type => 'Integer', :description => '')
+ GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'contact_span_threshold', :value => '2', :class_type => 'Integer', :description => '')
+ GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'name_changes_threshold', :value => '2', :class_type => 'Integer', :description => '')
+ GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'ban_threshold', :value => '20', :class_type => 'Integer', :description => '')
+ GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'ban_tries', :value => '2', :class_type => 'Integer', :description => '')
+ GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'blacklist_file', :value => '/var/opt/gemeinschaft/firewall/blacklist', :class_type => 'String', :description => '')
+ GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'blacklist_file_comment', :value => '# PERIMETER_BAN - points: {points}, generated: {date}', :class_type => 'String', :description => '')
+ GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'blacklist_file_entry', :value => '{received_ip} udp 5060', :class_type => 'String', :description => '')
+ GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'ban_command', :value => 'sudo /sbin/service shorewall refresh', :class_type => 'String', :description => '')
+ GsParameter.create(:entity => 'perimeter', :section => 'checks', :name => 'check_frequency', :value => '1', :class_type => 'Integer', :description => '')
+ GsParameter.create(:entity => 'perimeter', :section => 'checks', :name => 'check_username_scan', :value => '1', :class_type => 'Integer', :description => '')
+ GsParameter.create(:entity => 'perimeter', :section => 'checks', :name => 'check_bad_headers', :value => '1', :class_type => 'Integer', :description => '')
+ GsParameter.create(:entity => 'perimeter', :section => 'bad_headers', :name => 'user_agent', :value => '^friendly.scanner$', :class_type => 'String', :description => '')
+ GsParameter.create(:entity => 'perimeter', :section => 'bad_headers', :name => 'to_user', :value => '^%d+', :class_type => 'String', :description => '')
+ GsParameter.create(:entity => 'perimeter', :section => 'bad_headers', :name => 'auth_result', :value => '^FORBIDDEN$', :class_type => 'String', :description => '')
+ end
+
+ def down
+ GsParameter.where(:entity => 'perimeter').destroy_all
+ end
+end