If you only need 25 of them, missions are probably the easiest way to get them. There's a bit of luck involved, but on the mission board at my current station there are 6 different missions (of various types) offering Modular Terminals rewards, all offering over 25 and one offering as many as 60. One of the missions was a single-jump data courier mission which is basically impossible to fail and would take less time than tracking down a carrier.
Go to a station with one of the following economies: Service, Terraforming, Colony, Tourism, ... maybe Military if they're closer. Those economies don't produce very many commodity types, so the commodity rewards on the mission boards are mostly the mission-only commodities like Modular Terminals. Whereas if you're in a station with a production economy, most of the commodity rewards are for the goods the station produces, which isn't any use right now.