# Flux Through a Sphere Containing a Dipole

So I am probably understanding something wrong but would gauss's law $\frac{Qinside}{\epsilon0}$ for a sphere surrounding an electric dipole, with a point charge just outside of the sphere.

If you imagine this scenario without the outside charge, the field lines through the surface all come back in and some don't leave the sphere making the flux = 0. Which is consistent with $\frac{total charge inside}{epsilon0}$ which is = 0. BUT If you introduced a negative charge just outside the sphere some of the electric field lines would terminate there, making the flux a positive number (not all the field lines that leave through the surface return). While the equation $\frac{total charge inside}{epsilon0}$ would still be 0.

What is wrong with my mental picture? Why does this scenario seem to violate Gauss's Law?