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 and policies configured by the central controller. This improves network performance by separating the control and forwarding functions onto different devices and allowing dynamic configuration of rules.