What area of Massachusetts do you need to be within a couple of hours of? Pretty much the whole state allows you to get to MA within 2-3 hours, but if you mean Boston or the South Shore it's different.
The prettiest town in Southeast NH is Atkinson, in my opinion. Rural but ritzy-rural. About 90 minutes to Boston except at rush hour. Lots of open land, wonderful library, etc.
Animals-wise you should be in pretty good shape almost anywhere that's not the center of a city. NH has some very good laws that won't let towns restrict the number of animals that you can own. However, if you want or need a barn, make sure you either buy an existing barn as part of your property or have a wide enough property that you can build one. Our property in Plaistow is 200 x 675 or so - two and a half acres - but in Plaistow barns need to be no less than 100 feet from a property line. In order to build our run-in shed, which is where the chickens live right now, we had to get a zoning variance and we had to put it right on the center line of the property. So be absolutely sure you understand the zoning in the town you're looking in, and don't trust the realtor. Go talk to the town hall secretary, who is likely to know everything about everything. Every town is a small town up here; you typically cross into a new town by the time you go three miles, and every town has its own town hall and bylaws and zoning. So don't be shocked if you end up looking in five or ten town names all in the same very small radius, and you can't count on the rules of one town carrying over to the others.