This happened recently when we moved into an old house. Sugar ants built a nest under the wireless router and cable modem. We have since bleached, boraxed, and even set up carnivorous plants near the windows. It is war.
When I had ants in my basement a few years back, I set out trays of photographic developer and the ants just vanished. They hate the smell, I guess, but whatever, it worked.