At stumps on the second day, India were 181 for three in reply to South Africa A's first-innings total of 322 all out, trailing by 141 runs.
While Samarth was dismissed by fast bowler Dane Paterson after scoring 77 off 113 balls, Iyer remained unbeaten on 56 off 74 balls.
Earlier in the day, India did well to bowl out the hosts who finished the first day at 258 for five.
There were two wickets for Krishnappa Gowtham as the hosts lost wickets at regular intervals after a 167-run opening partnership between Stephen Cook (98) and skipper Aiden Markram (74).
When India's turn to bat came, opener Sudip Chatterjee contributed 46 off 96 balls, and was involved in a 106-run stand with Samarth.