Formal:
* Ferme: This is the most direct translation, literally meaning "farm." You can use it to refer to the building itself or the whole farm property.
* Maison de ferme: This is a more specific phrase, meaning "farmhouse." It emphasizes the building's purpose as a dwelling.
Informal:
* Ferme: As mentioned above, this is also used informally.
* Maison à la campagne: This means "country house" and can be used for a farmhouse, especially if it's a charming or picturesque one.
Other options:
* Ferme fortifiée: Fortified farmhouse
* Mas: This is a regional term, mainly used in the south of France, for a farmhouse or country house.
The best way to choose the right word depends on the specific situation and the desired level of formality.