Sewer gasses are toxic and contain methane which is an explosive substance. If you let it accumulate in an unventilated area... well, a spark could cause an explosion.
Take a plastic grocery bag, plastic foil used for food packaging, rubber glove, or anything similar. If it is very thin, fold it 2 or 3 times to make is thicker, place the center of this piece of plastic over the open drain pipe, stretch it slightly and fold edges along its sides. Use a duct tape, rubber band, or piece of cord to wrap it around the pipe and secure the plastic.
Another option is to use the same piece of plastic but stuff it with a couple of crushed paper towels to create sort of a round plug and push it into the pipe. Push it into the drain pipe about 2-3 inches and wrap the remaining part of plastic to the pipe exterior wall.