07.06.2014 Views

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

of the /etc/network/interfaces file. In the following example, the script is stored under<br />

/usr/local/etc/arrakis.fw.<br />

auto eth0<br />

iface eth0 inet static<br />

address 192.168.0.1<br />

network 192.168.0.0<br />

netmask 255.255.255.0<br />

broadcast 192.168.0.255<br />

up /usr/local/etc/arrakis.fw<br />

Example 14.1<br />

interfaces file calling firewall script<br />

14.3. Supervision: Prevention, Detection, Deterrence<br />

Monitoring is an integral part of any security policy for several reasons. Among them, that the<br />

goal of security is usually not restricted to guaranteeing data confidentiality, but it also includes<br />

ensuring availability of the services. It is therefore imperative to check that everything works<br />

as expected, and to detect in a timely manner any deviant behavior or change in quality of the<br />

service(s) rendered. Monitoring activity can enable the detection of intrusion attempts and<br />

enable a swift reaction before they cause grave consequences. This section reviews some tools<br />

that can be used to monitor several aspects of a Debian system. As such, it completes the section<br />

dedicated to generic system monitoring in Chapter 12, Advanced Administration (page 298).<br />

14.3.1. Monitoring Logs with logcheck<br />

The logcheck program monitors log files every hour by default. It sends unusual log messages<br />

in emails to the administrator for further analysis.<br />

The list of monitored files is stored in /etc/logcheck/logcheck.logfiles; the default values<br />

work fine if the /etc/syslog.conf file has not been completely overhauled.<br />

logcheck can work in one of three more or less detailed modes: paranoid, server and workstation.<br />

The first one is very verbose, and should probably be restricted to specific servers such<br />

as firewalls. The second (and default) mode is recommended for most servers. The last one is<br />

designed for workstations, and is even terser (it filters out more messages).<br />

In all three cases, logcheck should probably be customized to exclude some extra messages<br />

(depending on installed services), unless the admin really wishes to receive hourly batches of<br />

long uninteresting emails. Since the message selection mechanism is rather complex, /usr/<br />

share/doc/logcheck-database/README.logcheck-database.gz is a required — if challenging<br />

— read.<br />

The applied rules can be split into several types:<br />

382 The Debian Administrator's Handbook

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!