
First, "ifconfig eth0 down/up" on Ubuntu and Debian breaks connection to the instance, thus tests after this one all fail. Second, replacing appending iptable rules with inserting them on the top of iptables, otherwise the tests may fail if iptables are not empty.