Iran's military has warned it will target ships that do not use a northern route approved by Tehran.