Gating in model nanopores