Introduction

Floodlight contains a firewall application that enforces ACL in a reactive way. In a reactive way, the controller enforces ACL rules by monitoring Packet-in messages and then pushing relevant flow entries. However in a proactive way, the controller enforces ACL rules without being requested by the switch, thus to avoid additional delays. 

This ACL application parses user's REST request for ACL updating and enforces that by static flow entries in a proactive way without monitoring Packet-in messages. It can also remove ACL flow entry it generated timely when related ACL rule is removed. 

Issues

There are some issues you should know before using the ACL application:

ACL REST Interface

Add an ACL rule:

curl -X POST -d '{"src-ip":"10.0.0.1/32","dst-ip":"10.0.0.2/32","action":"deny"}' http://<controller_ip>:8080/wm/acl/rules/json

The application will generate an distinct id for every new added rule. 

Properties of an ACL rule:

KeyValueNotes
nw-protostring"TCP" or "UDP" or "ICMP" (ignoring case)
src-ipIPv4 address[/mask]Either src-ip or dst-ip must be specified.
dst-ipIPv4 address[/mask]Either src-ip or dst-ip must be specified.
tp-dstnumberValid when nw-proto == "TCP" or "UDP".
actionstring"DENY" or "ALLOW" (ignoring case), set to "DENY" if not specified.

Listing all ACL rules:

curl http://<controller_ip>:8080/wm/acl/rules/json | python -mjson.tool

Remove an ACL rule: 

curl -X DELETE -d '{"ruleid":"1" }' http://<controller_ip>:8080/wm/acl/rules/json

Remove all ACL rules:

curl http://<controller_ip>:8080/wm/acl/clear/json