Effects of confinement on the structure and diffusion properties of simple and complex ionic systems