We consider ion transport through protein ion channels in lipid membranes and water-filled nanopores in silicon films. It is known that, due to the large ratio of dielectric constants of water and the surrounding material, an ion placed inside the channel faces a large electrostatic self-energy barrier. The barrier leads to an exponentially large resistance of the channel. We study reduction of the electrostatic barrier by immobile charges located on the internal walls of the channel. We show that the barrier practically vanishes already at relatively small concentration of wall charges.