Rebuilt Warranty

Bought a rebuilt Subaru Forester with less than 30,000 miles. Need advice regarding Subaru warranty and/or extended warranty for a rebuilt.