The consequences of the choice of electrostatic boundary conditions on the interfacial properties of water and on the free energy of ion adsorption from aqueous solution have been investigated. The Ewald summation method for lattices, which are periodic in two dimensions, is considered to be the most adequate method in slabs of finite thickness in one dimension. In agreement with the physics of the problem a field-free region in the bulk phases is observed. The use of spherical truncation methods like the shifted-force method leads to unphysical results. The electrostatic potential depends on the size of the system. Ewald summation methods for three-dimensional lattices lead to results in qualitative agreement with the corresponding two-dimensional lattice sum. The computed value of the electrostatic potential depends on an additional parameter, namely the lattice constant c in the direction perpendicular to the interface. The results for Ewald summation in three dimensions converge to the results for Ewald summation in two dimensions for large c, the shifted-force results converge to the same limit, when the surface area of the simulation cell becomes very large and the cut-off distance increases accordingly.