Correctly handle exit code 4 of iptables --wait

* retry in case of iptables RESOURCE_PROBLEM (exit code 4)
* put --wait parameter at end of iptables rules