Prevent VMs running on Ubuntu to lose internet connection.

Solution found at https://coderwall.com/p/n2y79g.