Ensure the iptablesis initialized with your newconfigurationswhen thevirtualmachinerebootsandnotwiththe defaultsetup. You can issue the following commands to save the firewall rules.
By examining the firewall logs, which are a record of every attempt to connect, those that are dropped and those that are allowed, it is possible to compare them to the firewall policy and discover unused rules.