This repository has been archived by the owner on May 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
PlatformUbuntu12
Wes edited this page May 20, 2014
·
36 revisions
This contrib script will work instead of a traditional PPA, it sets up:
- apt-get repo's
- elasticsearch
- zeromq
- most of the bind configuration
- user/group:
cif
and it's corresponding~/.profile
-
configure the environment
$ ./configure --sysconfdir=/etc/cif --localstatedir=/var/cif --prefix=/opt/cif $ ( cd contrib/platforms/debian && sudo ./debian.sh ) $ make && sudo make deps $ make test $ sudo make install $ sudo make fixperms
-
modify
/etc/bind/named.conf.options
to point at public-dnsoptions { ... forward only; forwarders { 8.8.8.8; 8.8.4.4; }; ... };
-
verify
/etc/bind/named.conf.local
// bypass any forwarders zone "cymru.com" { forward only; type forward; forwarders { }; }; zone "zen.spamhaus.org" { forward only; type forward; forwarders { }; }; zone "dbl.spamhaus.org" { forward only; type forward; forwarders { }; };
-
reload bind
-
verify bind is working properly
$ dig ns1.google.com
Apache is the default configured gateway to cif-router
, other solutions such as Nginx can also be used with a little different configuration.
-
configure the default-ssl site
<IfModule mod_ssl.c> <VirtualHost _default_:443> ServerAdmin webmaster@localhost + Include /etc/apache2/cif.conf DocumentRoot /var/www ...
-
configure the api configuration
<Location "/api"> SetHandler perl-script PerlResponseHandler Plack::Handler::Apache2 PerlSetVar psgi_app /opt/cif/bin/cif.psgi </Location>
-
restart apache
service apache2 restart
- start cif-router
$ sudo service cif-router start
- test connectivity to the router
$ curl -w "\n" -X GET 'http://localhost/api/_ping?token=1234'
{"timestamp":[1400585768,265584]}
- perform an initial
cif-smrt
test run
$ sudo -u cif cif-smrt --randomstart 0 --consolemode -d -r /opt/cif/etc/rules/default
[2014-04-19T16:00:51,868Z][INFO]: cleaning up tmp...
[2014-04-19T16:00:52,012Z][INFO]: generating ping request...
[2014-04-19T16:00:52,077Z][INFO]: sending ping...
[2014-04-19T16:00:52,089Z][INFO]: ping returned
[2014-04-19T16:00:52,106Z][INFO]: processing: bin/cif-smrt -d -r /opt/cif/etc/rules/default/bruteforceblocker.cfg -f ssh
[2014-04-19T16:00:52,427Z][INFO]: starting at: 2014-04-19T00:00:00Z
[2014-04-19T16:00:52,431Z][INFO]: processing...
[2014-04-19T16:00:54,532Z][INFO]: building events: 1273
[2014-04-19T16:00:55,335Z][INFO]: sending: 78
[2014-04-19T16:00:55,955Z][INFO]: took: ~0.921849
[2014-04-19T16:00:55,956Z][INFO]: rate: ~84.6125558524227 o/s
[2014-04-19T16:00:55,956Z][INFO]: processing: bin/cif-smrt -d -r /opt/cif/etc/rules/default/drg.cfg -f ssh
...
-
start cif-smrt
$ sudo service cif-smrt start