This session deals with how to secure your systems using a firewall, which is a network security system either h/w or s/w based, that uses rules to control incoming and outgoing NW traffic. The types of iptables (filter, nat, mangle, raw, and security) are discussed. The filter-iptables are discussed in length with input, output and forward chains and how to write rules for these chains. The practical implications of different rules are shown by running different applications. Finally the working of uncomplicated firewall (UFW) is also shown.