Gunmen from the al Qaeda-aligned group killed 148 people on Thursday when they stormed the Garissa University College campus, some 200 km (120 miles) from the Somali border.
Jets pounded the camps in Gondodowe and Ismail, both in the Gedo region bordering Kenya, the military source said on Monday. Cloud cover made it difficult to establish how much damage the bombings caused or estimate the death toll.
"We targeted the two areas because according to information we have, those (al Shabaab) fellows are coming from there to attack Kenya," he said.
Kenya has struggled to stop the flow of al Shabaab militants and weapons across its porous 700 km border with Somalia.
Al Shabaab militants have killed more than 400 people in Kenya since April 2013.
An African Union peacekeeping force that includes Kenyan troops, and which is fighting the group in Somalia, carried out arrests and seized ammunitions in an al Shabaab camp in Gondodowe last August.