refactor net connection tests to work with connection tracking in iptables [#49809139]