In continuation with the previous blog, we will now have a look at a basic agent which can act as a firewall. This firewall will drop all the packets outgoing to a particular IP destination and let other packets go through.
First we ensure that the following IPTABLES rule is installed:
sudo iptables -A OUTPUT -p ip -j NFQUEUE --queue-num 0
We can validate this by listing all the iptable rules using:
sudo iptables –list