Knocking all visitors off your network

There are times in every network owner's life when we just need that little extra bandwidth to watch the latest cat videos on YouTube in glorious HD resolution, right?

With the following Ettercap filter, our Pi will essentially become a very restrictive firewall and drop every single packet that comes our way, thus forcing the guests on our network to take a timeout:

pi@raspberrypi ~ $ nano dropfilter.ecf

Here is our minimalistic drop filter:

if (ip.proto == TCP || ip.proto == UDP) { 
  drop(); 
  msg("Dropped a packet!\n"); 
} 

The next step is to compile our Ettercap filter code into a binary file that can be interpreted by Ettercap, using the following command:

pi@raspberrypi ~ $ etterfilter dropfilter.ecf -o dropfilter.ef ...

Get Raspberry Pi for Secret Agents - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.