Hi Nicholas,
As others have mentioned, Portsmouth is basically a non-starter if you are looking to pay an MLS price for a property. Anyone buying a multi-family in Portsmouth will find the rents barely (and in some cases don't!) cover the rents.
Dover is more palatable, though from a strict investment point, even finding 1% properties can be difficult in this market. There are still gems out there here and there, but every time I've tried to pick one up they were under contract the second they hit the MLS; the deal was already worked out ahead of time. Personally I think buying in Dover is much more palatable as an owner occupied house hacking scenario, which won't work for you, though enough of you guys move north of the border maybe you can be persuaded :).
Rochester is often mentioned, and there are certainly good deals there. But I would honestly recommend Somersworth over Rochester for the "next town" after Dover to really gentrify. If I may make a quick case from an observational and anecdotal standpoint (I suppose we could dig into numbers deeper at another time). Somersworth is closer to Dover/Portsmouth/Kittery/Pease/the ocean etc. than almost all of Rochester is. As the primary draws of people to Dover are for the things south of the city, this means Somersworth is physically closer to amenities people want, including their jobs. It is more connected, via Route 9, to the commercial parts of the Dover than Rochester. Finally fixing Main St. in Somersworth is paying dividends for the area around downtown (though there is a looong way to go).
Let's be honest though, both towns are amongst the most dangerous and rough towns in NH, and routinely make (or even top) the list of worst places to live in the state. Drugs, property crime, and violence are a constant problem in these two cities, which have been hit by the drug epidemic worse than most. They are dumping grounds for section 8 tenants who have been priced out of places in Dover, Newmarket etc. Their down towns are directly adjacent to the worst areas of the cities, the "French town" of Rochester next to downtown is a C- neighborhood, at best, and is a contender for worst neighborhood in the state (though the tree streets of Manchester probably win that title). When the newspaper police log reads "1:35AM Rode Down Street, the public jumped into bushes" you know it's not a great neighborhood.
There are no doubt deals to be made there, but every section of Rochester that circles the downtown area, where the vast majority of multi-families are, are in I would say C neighborhoods. Somersworth has some multis on "the hill" and directly on main St. that aren't so bad; converted Victorians and the like. Because of Somersworth's downtown "bad" area being so much smaller, I think that it will take less time to change that area around. The sheer scale of the bad areas of Rochester range North, south, east, and west of Main St. means that a LOT more change has to come to that area to brig it up to speed.
To be sure, there are very nice areas in both towns I would be happy to live; there just aren't investments properties out there. That said, neither of these cities reputations are new. Rochester's downtown has been considered a dangerous place as long as I've been alive, and that sort of reputation doesn't get shed easily just because housing prices are on the rise in Dover. It took Dover 20 years to be considered a great place to live from the dive it was in the 90s. I don't think the change for Rochester will come any sooner, especially when there are other options.
That's not to dissuade anyone from buying a good investment, but just to factor in the quality of tenant you are going to get there and make sure it's built into your calculation. Almost no one who can afford to live in Dover is going to chose to live in Rochester instead; which means that the people living there are there because their income demands they be, not because it's a place they'd like to live necessarily. That said, money is money, and a savvy (and patient) investor can make a lot of money in those cities.
Just my two cents.