fixes to iptables module

Moving the call to the parser out of the for loop loop so that it's not re-created for each iptables rule. #17185