KHOST, AFGHANISTAN, JAN. 19 -- The airstrip at the newly relieved Afghan garrison of Khost was rocketed today as guerrillas sought to demonstrate the shakiness of the hold Soviet and Afghan government forces have on the eastern town.

The attack came just after nightfall, as two Afghan Air Force Antonov-26 transport planes, carrying foreign journalists back to Kabul after a government-sponsored visit to Khost, were preparing to take off.

Two rockets landed on either side of the first plane, each at a distance of about 500 yards, making Afghan troops guarding the airfield rush for cover.

The attack was preceded by a series of explosions as Afghan and Soviet army outposts traded fire with guerrillas in nearby hill positions.

Half a minute after the first plane took off, it was possible to see from its unlit windows a third explosion close to the dirt runway below.

Its engines screaming, the Antonov scattered a succession of flares to deflect possible incoming heat-seeking missiles, as it climbed steeply toward the relative safety of cloud cover.

As the plane headed northwest toward Kabul, intermittent flashes and arcs of machine-gun tracer bullets indicated that the exchanges were continuing.

All daylight flights into or out of Khost have been canceled for the past five months after six Antonovs were shot down by rebels using U.S.-made stinger missiles.

The wreck of one plane, brought down shortly before the start of the blockade of Khost last fall, was shown to foreign journalists near a village about six miles north of the town.

A mass of twisted burned-out metal, the remains of the plane lay close to the main road between Khost and the provincial capital of Gardez, which was reopened last month after a joint Soviet-Afghan offensive.

Another six miles along in the direction of Gardez, just as the road begins to rise toward a distant mountain pass, vehicles were forced to take a major detour because a series of bridges had been blown up by the rebels.