In order to evaluate the performance of the Pyretic controller for software-defined networks (SDN), a Mininet network emulator (Ubuntu 13.04 virtual machine) was installed and configured. The innovative solution proposed by this controller consists in the simplicity of defining the rules by means of high-level abstract functions and the support for modularity. Using dedicated operators, the multiple independent policies, running on one or several topologies, can be composed. Python scripts were developed for a firewall-traffic filtering based on MAC and IP addresses or other fields in the header. The solution can be easily extended as it is to a larger testbed in cloud-based networks (e.g. orchestrated by OpenStack).