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.

• INPUT: concerns packets whose destination is the firewall itself;<br />

• OUTPUT: concerns packets emitted by the firewall;<br />

• FORWARD: concerns packets transiting through the firewall (which is neither their<br />

source nor their destination).<br />

The nat table also has three standard chains:<br />

• PREROUTING: to modify packets as soon as they arrive;<br />

• POSTROUTING: to modify packets when they are ready to go on their way;<br />

• OUTPUT: to modify packets generated by the firewall itself.<br />

Figure 14.1<br />

How netfilter chains are called<br />

Each chain is a list of rules; each rule is a set of conditions and an action to execute when the<br />

conditions are met. When processing a packet, the firewall scans the appropriate chain, one<br />

rule after another; when the conditions for one rule are met, it “jumps” (hence the -j option in<br />

the commands) to the specified action to continue processing. The most common behaviors are<br />

standardized, and dedicated actions exist for them. Taking one of these standard actions interrupts<br />

the processing of the chain, since the packet's fate is already sealed (barring an exception<br />

mentioned below):<br />

BACK TO BASICS<br />

ICMP<br />

ICMP (Internet Control Message Protocol) is the protocol used to transmit complementary<br />

information on communications. It allows testing network connectivity<br />

with the ping command (which sends an ICMP echo request message,<br />

which the recipient is meant to answer with an ICMP echo reply message).<br />

It signals a firewall rejecting a packet, indicates an overflow in a receive<br />

buffer, proposes a beer route for the next packets in the connection, and so<br />

on. This protocol is defined by several RFC documents; the initial RFC777 and<br />

RFC792 were soon completed and extended.<br />

Chapter 14 — Security<br />

377

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

Saved successfully!

Ooh no, something went wrong!