fix network configuration

* add iptables package in lxc box
* refactor to extract common functions
* introduced net.sh script to configure virtual network separately