I want to develop a simple firewall (for understanding and testing purposes) which would filter out packets which obey the rules in a sample iptables rule file (I found a sample rules file in here: https://www.rigacci.org/docs/biblio/online/nag-2.0.html/x-087-2-firewall.example.html)
Is there any library that supports this operation? Is there a way to apply rules in an iptables file to a pcap file.