Unmanned aerial vehicles (UAVs) have become essential tools for exploring, mapping and inspection of unknown three-dimensional (3D) tunnel-like environments which is a very challenging problem. A computationally light navigation algorithm is developed in this paper for quadrotor UAVs to autonomously guide the vehicle through such environments. It uses sensors observations to safely guide the UAV along the tunnel axis while avoiding collisions with its walls. The approach is evaluated using several computer simulations with realistic sensing models and practical implementation with a quadrotor UAV. The proposed method is also applicable to other UAV types and autonomous underwater vehicles.