Living off grid is not illegal in Canada. Your house can be solar powered, you can grow your own food, and so on. However, there are national building codes that you must follow. Also, you cannot squat on someone else's land.