Barrier crossing with concentration boundary conditions in biological channels and chemical reactions