The law is valid for arbitry shaped surface, real or imaginary.
which exploit symmetry of the problem. Such surfaces are called Gaussian surfaces .