An iterative method is introduced successfully to solve the inverse kinematics of a 6-DOF manipulator of a tunnel drilling rig based on dual quaternion, which is difficult to get the solution by Denavit-Hartenberg(D-H) based methods. By the intuitive expression of dual quaternion to the orientation of rigid body, the coordinate frames assigned to each joint are established all in the same orientation, which does not need to use the D-H procedure. The compact and simple form of kinematic equations, consisting of position equations and orientation equations, is also the consequence of dual quaternion calculations. The iterative process is basically of two steps which are related to solving the position equations and orientation equations correspondingly. First, assume an initial value of the iterative variable; then, the position equations can be solved because of the reduced number of unknown variables in the position equations and the orientation equations can be solved by applying the solution from the position equations, which obtains an updated value for the iterative variable; finally, repeat the procedure by using the updated iterative variable to the position equations till the prescribed accuracy is obtained. The method proposed has a clear geometric meaning, and the algorithm is simple and direct. Simulation for 100 poses of the end frame shows that the average running time of inverse kinematics calculation for each demanded pose of end-effector is 7.2 ms on an ordinary laptop, which is good enough for practical use. The iteration counts 2-4 cycles generally, which is a quick convergence. The method proposed here has been successfully used in the project of automating a hydraulic rig.