Whether it's illegal is not really so black or white. In relation to international law, it is not illegal for israelis to reside in judea and samaria. Palestine is not a recognized country with defined borders. It may sound strange, but as long as people move into the area on their own accord - then it's quite legal to move in and build. What so many people and media are saying about the alledged illegality stems from a misunderstanding about what international law actually says.
Interior Minister Shalom: I will act to revoke terrorists' citizenship, residency status (Haaretz)
from the article: The Amona complex