diff options
author | spag <spag@golwen.net> | 2013-02-04 09:39:42 +0100 |
---|---|---|
committer | spag <spag@golwen.net> | 2013-02-04 09:39:42 +0100 |
commit | 0db4c7250feab288018d42cbd5c7d12657d60e3a (patch) | |
tree | 0961aa3967e2f3bfb646c27fab1daa3eec3c2065 /db/migrate/20130204065900_split_perimeter_parameters.rb | |
parent | 947d4a71a17518b734c32a148617bef15a42fed1 (diff) |
check calls
Diffstat (limited to 'db/migrate/20130204065900_split_perimeter_parameters.rb')
-rw-r--r-- | db/migrate/20130204065900_split_perimeter_parameters.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/db/migrate/20130204065900_split_perimeter_parameters.rb b/db/migrate/20130204065900_split_perimeter_parameters.rb new file mode 100644 index 0000000..b29bb29 --- /dev/null +++ b/db/migrate/20130204065900_split_perimeter_parameters.rb @@ -0,0 +1,30 @@ +class SplitPerimeterParameters < ActiveRecord::Migration + def up + GsParameter.where(:entity => 'perimeter', :section => 'checks').destroy_all + GsParameter.where(:entity => 'perimeter', :section => 'bad_headers').destroy_all + 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_register', :name => 'check_frequency', :value => '1', :class_type => 'Integer', :description => '') + GsParameter.create(:entity => 'perimeter', :section => 'checks_register', :name => 'check_username_scan', :value => '1', :class_type => 'Integer', :description => '') + GsParameter.create(:entity => 'perimeter', :section => 'checks_register', :name => 'check_bad_headers', :value => '1', :class_type => 'Integer', :description => '') + GsParameter.create(:entity => 'perimeter', :section => 'checks_call', :name => 'check_frequency', :value => '1', :class_type => 'Integer', :description => '') + GsParameter.create(:entity => 'perimeter', :section => 'checks_call', :name => 'check_bad_headers', :value => '1', :class_type => 'Integer', :description => '') + GsParameter.create(:entity => 'perimeter', :section => 'bad_headers_register', :name => 'user_agent', :value => '^friendly.scanner$', :class_type => 'String', :description => '') + GsParameter.create(:entity => 'perimeter', :section => 'bad_headers_register', :name => 'to_user', :value => '^%d+', :class_type => 'String', :description => '') + GsParameter.create(:entity => 'perimeter', :section => 'bad_headers_register', :name => 'auth_result', :value => '^FORBIDDEN$', :class_type => 'String', :description => '') + GsParameter.create(:entity => 'perimeter', :section => 'bad_headers_call', :name => 'user_agent', :value => '^friendly.scanner$', :class_type => 'String', :description => '') + GsParameter.create(:entity => 'perimeter', :section => 'bad_headers_call', :name => 'hangup_cause', :value => '^MANDATORY_IE_MISSING', :class_type => 'String', :description => '') + end + + def down + GsParameter.where(:entity => 'perimeter', :section => 'checks_register').destroy_all + GsParameter.where(:entity => 'perimeter', :section => 'checks_call').destroy_all + GsParameter.where(:entity => 'perimeter', :section => 'bad_headers_register').destroy_all + GsParameter.where(:entity => 'perimeter', :section => 'bad_headers_call').destroy_all + 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 +end |