Wireless sensor networks (WSNs) are being used for many applications ranging from mobile target surveillance to intelligent home networking. Due to the sensitive nature of the data transmitted by these applications, appropriate protection mechanisms are needed to prevent attackers from exploiting the weaknesses of the radio links. In this paper, we propose a novel group key management scheme called DynTunKey (dynamic tunneling and group key management protocol). This paper investigates the use of secure tunnels as a solution to improve the protection of WSNs. We propose a tunneling scheme that conforms to the security requirements of WSNs while having less computational and network overhead. We also propose a solution for a dynamic integration in the secured communication of a newly deployed sensor. A set of experiments has been conducted to assess the performance of the proposed scheme with regard to recent key management protocol and to traditional tunnels built using the IPSec protocol. We found that our protocol considerably reduces the number of transmitted messages as well as the computational load, which makes it suitable for WSNs. We tested the proposed protocol considering two models of mobility of the targets which are respectively the Random Walk model and the Gauss Markov model.