The present invention relates to the use of a casein hydrolysate as an antiviral agent for the treatment of opportunistic virus infections, especially herpesvirus and human papillomavirus. This casein hydrolysate has an application in both the therapeutic treatment of established symptoms and the prevention of the infection or the reactivation of a latent infection by an opportunistic virus. The casein hydrolysate of the present invention is effective for the prevention of opportunistic virus infections in individuals with weakened immune system.