Lyon, who had dismissed Cheteshwar Pujara at the stroke of lunch, snapped two more wickets - Virat Kohli (12) and Ajinkya Rahane (17) - and O' Keefe accounted for Karun Nair (26) as Australia dominated the second session.
At the break, Rahul and Ravichandran Ashwin (5) were batting on 79 and 4, respectively.
The Indian opener, who was dropped at 30 and 61, hit nine boundaries in his 175-ball innings.
In the post-lunch session, Lyon grabbed his second wicket by trapping the Kohli infront of the wicket. The Indian captain did not offer a shot and the ball rapped on the pads, prompting umpire Nigel Long to raise his fingers. This is the fifth time Lyon has removed Kohli in Tests.
Kohli was surprised and consulted Rahul for the review, but replays showed that the ball had pitched outside off and the impact was in line and going on to hit the wickets.
At 88 for three, Rahane walked in the field and the very first ball he was greeted by a loud leg before appeal by Lyon and close-in Australian fielders, but umpire Long turned down the decision.
Rahane also survived a soft appeal in the next ball too after Lyon's ball hit the thigh pad and went straight to the fielder at short leg.
In 39.2 overs, India brought their 100 up when Rahul hit Lyon through mid-wicket region for a single.
Rahul was lucky as he was dropped by David Warner, who standing at leg slip, failed to hold on to the ball after the India opener miscued an attempted paddle sweep. He was then batting on 61.
In the 48th over, Lyon struck for the third time, removing Rahane. The Mumbaikar was stumped by Mathew Wade, who recovered in time after fumbling a bit initially.
At 118 for four, Nair, who had a triple century to his name, walked into the middle to join Rahul.