Iran has allowed some Indian vessels through the Strait of Hormuz, saying it does not want other countries to suffer, while blocking ships linked to nations it considers hostile.