Influence of ion size and charge in nanofiltration