We present a simulation method to study electrolyte solutions in a dielectric slab geometry using a modified 3D Ewald summation. The method is fast and easy to implement, allowing us to rapidly resum an infinite series of image charges. In the weak coupling limit, we also develop a mean-field theory which allows us to predict the ionic distribution between the dielectric charged plates. The agreement between both approaches, theoretical and simulational, is very good, validating both methods. Examples of ionic density profiles in the strong electrostatic coupling limit are also presented. Finally, we explore the confinement of charge asymmetric electrolytes between neutral surfaces.