WASHINGTON (Reuters) - President Barack Obama would veto a cyber security bill being considered by the U.S. House of Representatives if it was presented to him for signature, the White House said on Wednesday.

The bill would allow the government and corporations to share information about hacking attacks on U.S. networks. But critics warn the measure would give the government free rein to monitor communications and filter content from websites. The White House, in explaining its opposition, said the bill failed to protect core U.S. infrastructure "while repealing important provisions of electronic surveillance law without instituting corresponding privacy, confidentiality, and civil liberties safeguards."

(Reporting By Alister Bull; Editing by Sandra Maler)