Water diffusion through OmpF, a porin in the outer membrane of Escherichia coli, is studied by molecular dynamics simulation. A first passage time approach allows characterizing the diffusive properties of a well-defined region of this channel. A carbon nanotube, which is considerably more homogeneous, serves as a model to validate the methodology. Here we find, in addition to the expected regular behavior, a gradient of the diffusion coefficient at the channel ends, witness of the transition from confinement in the channel to bulk behavior in the connected reservoirs. Moreover, we observe the effect of a kinetic boundary layer, which is the counterpart of the initial ballistic regime in a mean square displacement analysis. The overall diffusive behavior of water in OmpF shows remarkable similarity with that in a homogeneous channel. However, a small fraction of the water molecules appears to be trapped by the protein wall for considerable lengths of time. The distribution of trapping times exhibits a broad power law distribution psi(tau) approximately tau (-2.4), up to tau=10 ns, a bound set by the length of the simulation run. We discuss the effect of this distribution on the dynamic properties of water in OmpF in terms of incomplete sampling of phase space.