Genral Strategy
Using Ramps and Choke Points to Your Advantage
On many maps, such as "The Lost Temple," defending your base early
can be accomplished by stationing units on or around the ramps which
act as a natural choke point to your base. However, many people don't
make enough use of the "hold position" order, which can make that ramp
an airtight seal to the rest of your town, at least in the early game stages.
A lot of this is because the AI for moving and fighting on ramps leaves a
lot to be desired, but you can exploit this into a defensive advantage.
Zerg
For Zerg you'll need just a few Zerglings and a handful of Hydralisks to
seal off against even the most determined Zealot rusher. Arrange your
Zerglings on the ramp in a line, so that nothing can walk through. Once
you have them arranged neatly, click them all and order them to "hold
position." They'll stay put, but will attack anything that walks up to them.
Next, arrange Hydralisks in a line just behind the Zerglings. They'll act as
the main punishing force for anything that tries to walk up. The Zerglings
are just a buffer that prevents anything from attacking your Hydras.
A rush of Zealots will get chewed up because the AI prevents more than 1
or 2 Zealots from advancing up the ramp at a time, unless the player
manually commands each Zealot to attack the Zerglings at the top. Even
if they do that, they can't get more than 3 or 4 Zealots up at once, which
will be more than 2/3 dead by the time they start to attack the Zerglings.
Naturally a hard core Zergling rusher has 0% chance against such a
defense, no matter how much they outnumber you. Even a rush of
Marines will likely fail due to the -30% chance to hit that the Marines
would face for firing up hill. As long as you have another handful of Hydras
behind the first line, you'll be fine and you'll chew up a lot of Marines in the
process.
Protoss
Protoss can use a similar tactic by using Zealots in the front row, and
Dragoons or Photon Cannons in the back row. These can be
supplemented with a Shield Battery or two, which will provide the
difference against a Zealot rusher. The only thing to worry about might be
a large Marine or Hydra rush, because their ranged attacks can shoot
your helpless Zealots while they "hold position." If you stay close enough
to some supporting Photon Cannons, then the Cannons can punish the
ranged attackers, while they try to attack you.
Terran
Two Bunkers next to the ramp, filled with Marines, and a few Firebats
blocking the ramp will stop just about any possible onslaught of early
units. You could even have some Marines standing behind the Firebats for
yet more firepower. Again, have the Firebats hold position, and their fire,
combined with the support of the Marines will turn anyone foolish enough
to do a 3 Hatchery Zergling rush into mince meat. This defense will have
like results for Zealot rushers.