Great explanation of how speaker ports work, taken from the link above.
"The resonance of a vented box is caused by two factors. The
first factor is that air in an enclosed space behaves like a spring. Anyone who
has played with a beach ball, sat on an air mattress, or pressed on a balloon
will realize that after pressing against an air-filled object, the object will
spring back to its original shape. Ultimately, the air molecules want to remain
a certain distance apart, and when you temporarily squeeze them together, or
pull them apart, they will quickly return to their preferred spacing. The air
inside a vented enclosure behaves similarly to you sitting on an air mattress;
it acts as a spring pressing against the driver's cone, and also pressing
against the air in the loudspeaker port.
The loudspeaker driver exerts force on one end of the
spring, and the spring in turn exerts force on the air in the port, which
brings us to our second factor that sets the resonance of a vented box. The
port air is confined by the port walls and moves primarily as one big "slug" of
air. This volume of air moves in and out of the port as it is pushed and pulled
upon by the spring. The larger the volume of air in the port, the heavier it
is. A heavy slug of air changes direction more slowly, from moving into the box
to moving out of the box, when the spring pushes on it. A lighter slug of air
can change direction more quickly.
Combining the two factors above sets the resonance of a
vented enclosure to a specific frequency called the box resonance frequency,
commonly abbreviated Fb. The box resonance frequency is defined by the
combination of the volume of air in the port and the springiness of the air in
the box. A large enclosure volume makes for a soft spring, and a small
enclosure volume makes for a stiff spring. We use a large box (i.e. a soft spring)
with a heavy (i.e. large volume) slug of port air to produce a low Fb.
Virtually any box resonance frequency can be chosen by careful selection of
port volume and enclosure volume."