The Iranian oil ministry's computer network came under attack from hackers and a computer virus, prompting the Islamic Republic to disconnect the country's main oil export terminal from the Internet as a preventative measure, a semiofficial news agency reported on Monday.