Wiping over the head is one of the pillars of Wudu’. Scholars say that one may wipe over even few hairs. Wudu’ without wiping over the head is invalid. So, you need to rub even some hairs under the headscarf with water.
Dr. `Abdul-Fattah `Ashoor, Professor of the Exegesis of the Qur’an at Al-Azhar Univ., states: “wiping over the head is one of the obligatory acts of Wudu’. Some scholars say that one may wipe over some hairs.
Allah says in the Qur’an, “O you who believe, when you rise for prayer, wash your faces and your hands up to the elbows and lightly rub your heads and (wash) your feet up to the ankles.” (Al-Mai’dah: 6)
Accordingly, muslim women have to wipe over even some hairs from underneath the headscarf.”
Based on the above Fatwa, it becomes crystal clear that rubbing some hairs with water is a must. Also, one cannot rub the headscarf, for the Sunnah permitted Muslims to wipe over socks, not headscarves.