Confined polymer networks: The harmonic approach