This document proposes a software defined network based firewall technique using OpenFlow. It separates the control plane and data plane of network devices by using a central controller and forwarding elements. The forwarding element handles packet forwarding according to rules installed by the central controller. In the proposed system, an OpenFlow switch acts as a firewall by enforcing firewall rules installed on it by the central controller. This improves network performance by separating the control and forwarding functions onto different devices and allowing dynamic rule installation from a central location.