The tiny spaces of sentry boxes in cities, such as mobile security guards, highway toll booths, etc., are mostly located beside roads with harsh outdoor environments. Due to office demands, work windows often need to be kept or frequently opened. The intrusion of outdoor pollutants through the windows leads to the deterioration of the indoor air quality, and threatens the health of employees. This paper takes the gaseous pollutant NO2 as the representative and discusses the effective ventilation design scheme for improving the air quality in the sentry box with openings using two attached ventilation modes as the carrier. Taking the vertical wall-attached ventilation as an example, the formation of the air curtain at the window hole and its barrier performance to outdoor pollutants were studied. The conclusion is that when the air supply velocity is sufficient to form a complete air curtain at the window hole, it can effectively block the pollutants. The horizontal wall-attached ventilation shows that clean air is delivered to the space with openings, and the indoor air quality can also be well improved due to the dilution effect, but the effect of positive pressure control is not obvious due to the large opening. The conclusions can provide guidance for the ventilation design of sentry boxes with openings.