07.06.2014 Views

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

sign (=), it corresponds to precisely and only the priority indicated (auth.=notice only concerns<br />

messages from auth with notice priority).<br />

Each element in the list on the selector overrides previous elements. It is thus possible to restrict<br />

a set or to exclude certain elements from it. For example, kern.info;kern.!err means messages<br />

from the kernel with priority between info and warn. The none priority indicates the empty<br />

set (no priorities), and may serve to exclude a subsystem from a set of messages. Thus, *.crit;<br />

kern.none indicates all the messages of priority equal to or higher than crit not coming from<br />

the kernel.<br />

9.5.2.2. Syntax of Actions<br />

BACK TO BASICS<br />

The named pipe, a persistent<br />

pipe<br />

A named pipe is a particular type of file that operates like a traditional pipe<br />

(the pipe that you make with the “|” symbol on the command line), but via a<br />

file. This mechanism has the advantage of being able to relate two unrelated<br />

processes. Anything wrien to a named pipe blocks the process that writes<br />

until another process aempts to read the data wrien. This second process<br />

reads the data wrien by the first, which can then resume execution.<br />

Such a file is created with the mkfifo command.<br />

The various possible actions are:<br />

• add the message to a file (example: /var/log/messages);<br />

• send the message to a remote syslog server (example: @log.falcot.com);<br />

• send the message to an existing named pipe (example: |/dev/xconsole);<br />

• send the message to one or more users, if they are logged in (example: root,rhertzog);<br />

• send the message to all logged in users (example: *);<br />

• write the message in a text console (example: /dev/y8).<br />

SECURITY<br />

Forwarding logs<br />

It is a good idea to record the most important logs on a separate machine (perhaps<br />

dedicated for this purpose), since this will prevent any possible intruder<br />

from removing traces of their intrusion (unless, of course, they also compromise<br />

this other server). Furthermore, in the event of a major problem (such<br />

as a kernel crash), you have the logs available on another machine, which increases<br />

your chances of determining the sequence of events that caused the<br />

crash.<br />

To accept log messages sent by other machines, you must reconfigure rsyslog:<br />

in practice, it is sufficient to activate the ready-for-use entries in /etc/<br />

rsyslog.conf ($ModLoad imudp and $UDPServerRun 514).<br />

202 The Debian Administrator's Handbook

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

Saved successfully!

Ooh no, something went wrong!